Dilerseniz testleri tek tek de çalıştırabilirsiniz.

unittests/run.py specfiletests archivetests

veya hepsini çalıştırmak için (eskisi gibi)

unittests/run.py
This commit is contained in:
Barış Metin
2005-06-14 11:39:50 +00:00
parent b446419792
commit 98843d8a15
+18 -6
View File
@@ -4,18 +4,30 @@ import unittest
import sys
sys.path.append(".")
import specfiletests
import fetchertests
import archivetests
runTestSuite = lambda(x): unittest.TextTestRunner(verbosity=2).run(x)
def run_all():
import specfiletests
import fetchertests
import archivetests
def main():
alltests = unittest.TestSuite((
specfiletests.suite,
fetchertests.suite,
archivetests.suite
))
unittest.TextTestRunner(verbosity=2).run(alltests)
runTestSuite(alltests)
if __name__ == "__main__":
main()
args = sys.argv
if len(args) > 1: # run modules given from the command line
tests = sys.argv[1:]
for test in tests:
module = __import__(test)
print "\nRunning tests in '%s'...\n" % (test)
runTestSuite(module.suite)
else: # run all tests
print "\nRunning all test in an order...\n"
run_all()