X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=bin%2Frun_tests;h=4ce94e771237ce22dfc15be61bf30cb5c9643cb0;hb=856b96616bcfcbc6f5c9e04b6f6dcc07fa7a1ff7;hp=69b9a8818a541ee838a2753b50e94a05ca3afe0a;hpb=fbf6257eecbc601a4f5748583d0188adc1e5ffec;p=dead%2Fcensus-tools.git diff --git a/bin/run_tests b/bin/run_tests index 69b9a88..4ce94e7 100755 --- a/bin/run_tests +++ b/bin/run_tests @@ -5,13 +5,16 @@ import sys, os, site site.addsitedir(os.path.dirname(os.path.abspath(sys.argv[0])) + '/../src') import unittest +import Census from Tests.Unit import CensusTest +from Tests.Unit import DistributionTest from Tests.Unit import FileUtilsTest from Tests.Unit import GeometryTest from Tests.Unit import KMLTest from Tests.Unit import LEHDTest from Tests.Unit import SummaryFile1Test from Tests.Unit import StringUtilsTest +from Tests.Unit import UniformDistributionTest suite = unittest.TestSuite() suite.addTest(CensusTest.suite()) @@ -21,4 +24,16 @@ suite.addTest(KMLTest.suite()) suite.addTest(SummaryFile1Test.suite()) suite.addTest(StringUtilsTest.suite()) suite.addTest(LEHDTest.suite()) +suite.addTest(UniformDistributionTest.suite()) +suite.addTest(DistributionTest.suite()) unittest.TextTestRunner(verbosity=2).run(suite) + +try: + # The Census.Database initialization will raise an exception + # if the database cannot be accessed. + cdb = Census.Database() + db_suite = unittest.TestSuite() + db_suite.addTest(CensusTest.db_suite()) + unittest.TextTestRunner(verbosity=2).run(db_suite) +except: + pass