Skip to content

Commit

Permalink
Fix the tests of dev/run-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed Jun 24, 2015
1 parent def2d8a commit d6a77d3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions dev/run-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@
# Functions for traversing module dependency graph
# -------------------------------------------------------------------------------------------------


def determine_modules_for_files(filenames):
"""
Given a list of filenames, return the set of modules that contain those files.
If a file is not associated with a more specific submodule, then this method will consider that
file to belong to the 'root' module.
>>> sorted(x.name for x in determine_modules_for_files(["python/pyspark/a.py", "sql/test/foo"]))
['pyspark', 'sql']
['pyspark-core', 'sql']
>>> [x.name for x in determine_modules_for_files(["file_not_matched_by_any_subproject"])]
['root']
"""
Expand Down Expand Up @@ -90,8 +91,11 @@ def determine_modules_to_test(changed_modules):
['root']
>>> sorted(x.name for x in determine_modules_to_test([modules.graphx]))
['examples', 'graphx']
>>> sorted(x.name for x in determine_modules_to_test([modules.sql]))
['examples', 'hive-thriftserver', 'mllib', 'pyspark', 'sparkr', 'sql']
>>> x = sorted(x.name for x in determine_modules_to_test([modules.sql]))
>>> x # doctest: +NORMALIZE_WHITESPACE
['examples', 'hive-thriftserver', 'mllib', 'pyspark-core', \
'pyspark-mllib', 'pyspark-sql', 'pyspark-sql', 'pyspark-streaming', \
'sparkr', 'sql']
"""
# If we're going to have to run all of the tests, then we can just short-circuit
# and return 'root'. No module depends on root, so if it appears then it will be
Expand Down

0 comments on commit d6a77d3

Please sign in to comment.