From: Zac Medico Date: Mon, 29 Aug 2011 02:59:01 +0000 (-0700) Subject: Sort test cases, for predictable order. X-Git-Tag: v2.2.0_alpha52~43 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ab21cd451955ff7ed9419ffdbe3dc34bbb397281;p=portage.git Sort test cases, for predictable order. --- diff --git a/pym/portage/tests/__init__.py b/pym/portage/tests/__init__.py index 6f21d10bd..dcf73bab6 100644 --- a/pym/portage/tests/__init__.py +++ b/pym/portage/tests/__init__.py @@ -42,6 +42,7 @@ def main(): if TEST_FILE in files: testDirs.append(root) + testDirs.sort() for mydir in testDirs: suite.addTests(getTests(os.path.join(basedir, mydir), basedir) ) return TextTestRunner(verbosity=2).run(suite) @@ -86,6 +87,7 @@ def getTests(path, base_path): """ files = os.listdir(path) files = [ f[:-3] for f in files if f.startswith("test") and f.endswith(".py") ] + files.sort() parent_path = path[len(base_path)+1:] parent_module = ".".join(("portage", "tests", parent_path)) parent_module = parent_module.replace('/', '.')