From 8013eec7d21ce515a994c036cee3fb599586bac6 Mon Sep 17 00:00:00 2001 From: gryf Date: Sat, 9 May 2009 05:44:05 +0000 Subject: [PATCH] Removed needless test collector. Used nosetest instead. --- test/run_tests.py | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100755 test/run_tests.py diff --git a/test/run_tests.py b/test/run_tests.py deleted file mode 100755 index 791bc11..0000000 --- a/test/run_tests.py +++ /dev/null @@ -1,45 +0,0 @@ -""" - Project: pyGTKtalog - Description: Test harvester and runner. - Type: exec - Author: Roman 'gryf' Dobosz, gryf73@gmail.com - Created: 2008-12-15 -""" -import sys -import unittest -from os import path, chdir -import glob - - -def setup_path(): - """Sets up the python include paths to include needed directories""" - this_path = path.abspath(path.dirname(__file__)) - sys.path = [path.join(this_path, "unit")] + sys.path - return - -def build_suite(): - """Build suite test from files in unit directory. Filenames with test - suites should always end with "_test.py". - """ - modules = [] - for fname in glob.glob1('unit', '*_test.py'): - class_name = fname[:-8] - if "_" in class_name: - splited = class_name.split("_") - class_name = 'Test' - for word in splited: - class_name += word.capitalize() - else: - class_name = "Test" + class_name.capitalize() - - modules.append(fname[:-3]) - - modules = map(__import__, modules) - load = unittest.defaultTestLoader.loadTestsFromModule - return unittest.TestSuite(map(load, modules)) - -if __name__ == "__main__": - chdir(path.abspath(path.dirname(__file__))) - setup_path() - unittest.main(defaultTest="build_suite") -