Exemplo n.º 1
0
 def test_load_and_execute_undecorated_test(self):
     path = (
         "/home/loganfillo/Documents/Jormungandr/src/simulator/" +
         "pysimtest/tests/testfiles/loader/loader_test_undecorated_test.py")
     try:
         sim_loader = loader.SimTestLoader()
         sim_loader.load_and_execute(path)
         pytest.fail()
     except SystemExit:
         pass
Exemplo n.º 2
0
 def test_execute_suites(self):
     path = ("/home/loganfillo/Documents/Jormungandr/src/simulator/" +
             "pysimtest/tests/testfiles/loader/loader_test_all_run.py")
     sim_loader = loader.SimTestLoader()
     suites = sim_loader._load_suites(path)
     start = time.time()
     sim_loader._execute_suites(suites)
     end = time.time()
     run_time = end - start
     print(run_time)
     assert run_time > 10 and run_time < 20
Exemplo n.º 3
0
 def test_load_suites_half_running(self):
     path = ("/home/loganfillo/Documents/Jormungandr/src/simulator/" +
             "pysimtest/tests/testfiles/loader/loader_test_half_run.py")
     try:
         sim_loader = loader.SimTestLoader()
         suites = sim_loader._load_suites(path)
         for suite in suites:
             assert len(suite._tests) == 1
     except SystemExit:
         pytest.fail()
         pass
Exemplo n.º 4
0
 def test_load_suites_two_suites(self):
     path = ("/home/loganfillo/Documents/Jormungandr/src/simulator/" +
             "pysimtest/tests/testfiles/loader/loader_test_two_suites.py")
     try:
         sim_loader = loader.SimTestLoader()
         suites = sim_loader._load_suites(path)
         assert len(suites) == 2
         running_tests = 0
         for suite in suites:
             running_tests += len(suite._tests)
         assert running_tests == 3
     except SystemExit:
         pytest.fail()
         pass