Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1873)

Unified Diff: tools/telemetry/telemetry/internal/util/find_dependencies_unittest.py

Issue 1347283006: Extend unittest to test follow-module behavior of find_dependencies.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/telemetry/telemetry/internal/testing/dependency_test_dir/dog/dog/dog_object.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/internal/util/find_dependencies_unittest.py
diff --git a/tools/telemetry/telemetry/internal/util/find_dependencies_unittest.py b/tools/telemetry/telemetry/internal/util/find_dependencies_unittest.py
index 8afd21c78e0cb9b65fc49e5565157a058fb7604a..96ac04b26c36d1166d2b961f2e47b87f60f67d3d 100644
--- a/tools/telemetry/telemetry/internal/util/find_dependencies_unittest.py
+++ b/tools/telemetry/telemetry/internal/util/find_dependencies_unittest.py
@@ -11,9 +11,13 @@ from telemetry.internal.util import find_dependencies
class FindDependenciesTest(unittest.TestCase):
def testFindPythonDependencies(self):
- dog_object_path = os.path.join(
+ dog_module_path = os.path.join(
util.GetUnittestDataDir(),
- 'dependency_test_dir', 'dog', 'dog', 'dog_object.py')
+ 'dependency_test_dir', 'dog', 'dog')
+ dog_object_path = os.path.join(dog_module_path, 'dog_object.py')
+ bone_module_path = os.path.join(dog_module_path, 'bone')
+ bone_module_init_path = os.path.join(bone_module_path, '__init__.py')
+ bone_object_path = os.path.join(bone_module_path, 'bone_object.py')
nednguyen 2015/09/22 15:11:41 Can you factor these extra tests to a different te
cat_module_path = os.path.join(
util.GetUnittestDataDir(),
'dependency_test_dir', 'other_animals', 'cat', 'cat')
@@ -21,4 +25,6 @@ class FindDependenciesTest(unittest.TestCase):
cat_object_path = os.path.join(cat_module_path, 'cat_object.py')
self.assertEquals(
set(p for p in find_dependencies.FindPythonDependencies(dog_object_path)),
- {dog_object_path, cat_module_path, cat_module_init_path, cat_object_path})
+ {dog_object_path,
+ bone_module_path, bone_module_init_path, bone_object_path,
+ cat_module_path, cat_module_init_path, cat_object_path})
« no previous file with comments | « tools/telemetry/telemetry/internal/testing/dependency_test_dir/dog/dog/dog_object.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698