From 5ff125d6cde071aeed5897729936d77202cbc355 Mon Sep 17 00:00:00 2001 From: "ade@google.com" Date: Fri, 10 Dec 2010 22:54:02 +0000 Subject: [PATCH] Moved tests to a sub-folder of the contrib folder. Made globs in runtest.py check one level down --- contrib_tests/buzz/__init__.py | 0 contrib_tests/{ => buzz}/test_simple_buzz_wrapper.py | 0 runtests.py | 5 ++++- 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 contrib_tests/buzz/__init__.py rename contrib_tests/{ => buzz}/test_simple_buzz_wrapper.py (100%) diff --git a/contrib_tests/buzz/__init__.py b/contrib_tests/buzz/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/contrib_tests/test_simple_buzz_wrapper.py b/contrib_tests/buzz/test_simple_buzz_wrapper.py similarity index 100% rename from contrib_tests/test_simple_buzz_wrapper.py rename to contrib_tests/buzz/test_simple_buzz_wrapper.py diff --git a/runtests.py b/runtests.py index 776a171..30dc414 100644 --- a/runtests.py +++ b/runtests.py @@ -18,7 +18,10 @@ sys.path.insert(0, os.getcwd()) def build_suite(folder, verbosity): # find all of the test modules - modules = map(fullmodname, glob.glob(os.path.join(folder, 'test_*.py'))) + top_level_modules = map(fullmodname, glob.glob(os.path.join(folder, 'test_*.py'))) + # TODO(ade) Verify that this works on Windows. If it doesn't then switch to os.walk instead + lower_level_modules = map(fullmodname, glob.glob(os.path.join(folder, '*/test_*.py'))) + modules = top_level_modules + lower_level_modules if verbosity > 0: print "Running the tests found in the following modules:" print modules