Skip to content

Commit ba2e9f1

Browse files
committedDec 12, 2017
Nitpicky markups for David
1 parent 87cd5e4 commit ba2e9f1

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed
 

‎scripts/hypothesistooling.py

+5-10
Original file line numberDiff line numberDiff line change
@@ -329,29 +329,24 @@ def update_for_pending_release():
329329
)
330330

331331

332-
def has_no_effect_on_tests(path):
333-
"""Is this a file which has we can safely assume has no effect on tests?"""
332+
def could_affect_tests(path):
333+
"""Does this file have any effect on test results?"""
334334
# RST files are the input to some tests -- in particular, the
335335
# documentation build and doctests. Both of those jobs are always run,
336336
# so we can ignore their effect here.
337337
#
338338
# IPython notebooks aren't currently used in any tests.
339339
if path.endswith(('.rst', '.ipynb')):
340-
return True
340+
return False
341341

342342
# These files exist but have no effect on tests.
343343
if path in ('CITATION', 'LICENSE.txt', ):
344-
return True
345-
346-
# All of these files definitely have an effect on tests, and we should
347-
# always run tests if any of them have changed.
348-
if path.startswith(('src/', 'tests/', 'requirements/', 'setup.py')):
349344
return False
350345

351346
# We default to marking a file "interesting" unless we know otherwise --
352347
# it's better to run tests that could have been skipped than skip tests
353348
# when they needed to be run.
354-
return False
349+
return True
355350

356351

357352
def changed_files_from_master():
@@ -393,7 +388,7 @@ def should_run_ci_task(task, is_pull_request):
393388
changed_files = changed_files_from_master()
394389

395390
interesting_changed_files = [
396-
f for f in changed_files if not has_no_effect_on_tests(f)
391+
f for f in changed_files if could_affect_tests(f)
397392
]
398393

399394
if interesting_changed_files:

0 commit comments

Comments
 (0)
Please sign in to comment.