コード例 #1
0
ファイル: runtests.py プロジェクト: maheshdas/sentimentally
def run(test_folder_name, verbosity, exit_on_failure):
  # Build and run the tests in test_folder_name
  tests = build_suite(test_folder_name, verbosity)
  result = unittest.TextTestRunner(verbosity=verbosity).run(tests)
  if exit_on_failure and not result.wasSuccessful():
    sys.exit(1)
  cleanup()
コード例 #2
0
ファイル: test_manifold.py プロジェクト: alub/plong
 def setUp(self):
     cleanup()
コード例 #3
0
ファイル: test_db_logs.py プロジェクト: gtog/tfc
 def tearDown(self):
     cleanup(self.unittest_dir)
コード例 #4
0
ファイル: runtests.py プロジェクト: myblup/atompubbase
# try to start in a consistent, predictable location
if sys.path[0]: 
    os.chdir(sys.path[0])

# find all of the planet test modules
modules = map(fullmodname, glob.glob(os.path.join('tests', 'test_*.py')))
print "Running the tests found in the following modules:"
print modules

# load all of the tests into a suite
try:
    suite = unittest.TestLoader().loadTestsFromNames(modules)
except Exception, exception:
    # attempt to produce a more specific message
    for module in modules: 
        __import__(module)
    raise

verbosity = 1
if "-q" in sys.argv or '--quiet' in sys.argv:
    verbosity = 0
if "-v" in sys.argv or '--verbose' in sys.argv:
    verbosity = 2

# run test suite
unittest.TextTestRunner(verbosity=verbosity).run(suite)

cleanup()

コード例 #5
0
ファイル: test_crypto.py プロジェクト: todun/tfc
 def tearDown(self) -> None:
     """Post-test actions."""
     os.chdir('..')
     cleanup(self.unit_test_dir)
コード例 #6
0
ファイル: test_db_settings.py プロジェクト: purplesparkle/tfc
 def tearDown(self) -> None:
     """Post-test actions."""
     cleanup(self.unit_test_dir)
コード例 #7
0
ファイル: test_output_loop.py プロジェクト: savg110/tfc
 def tearDown(self) -> None:
     """Post-test actions."""
     time.sleep = self.o_sleep
     cleanup(self.unit_test_dir)
コード例 #8
0
 def tearDown(self) -> None:
     """Post-test actions."""
     tear_queues(self.queues)
     cleanup(self.unit_test_dir)
コード例 #9
0
ファイル: test_packet.py プロジェクト: todun/tfc
 def tearDown(self):
     """Post-test actions."""
     cleanup(self.unit_test_dir)
     tear_queues(self.queues)
コード例 #10
0
ファイル: test_commands.py プロジェクト: todun/tfc
 def tearDown(self):
     """Post-test actions."""
     cleanup(self.unit_test_dir)
     with ignored(OSError):
         os.remove('Receiver - Plaintext log (None)')
コード例 #11
0
ファイル: test_packet.py プロジェクト: gtog/tfc
 def tearDown(self):
     cleanup(self.unittest_dir)
     tear_queues(self.queues)