def test_testsuite_results(self):
     # allow dupe has to be set as the prev test may not have released the module
     
     expected_results = {'test_test1.py': ['Test_Test', 'Test_Test2'], 'test_test2.py': ['Test_Test21', 'Test_Test22']}
     suite, testsummary = testsuite_get('./dir',allowdupe=True)
     testresult = testsuite_run(suite)
     
     testsuite_results(testresult)
     
     self.assertEqual(testsummary,expected_results)
Exemple #2
0
    def test_testsuite_results(self):
        # allow dupe has to be set as the prev test may not have released the module

        expected_results = {
            'test_test1.py': ['Test_Test', 'Test_Test2'],
            'test_test2.py': ['Test_Test21', 'Test_Test22']
        }
        suite, testsummary = testsuite_get('./dir', allowdupe=True)
        testresult = testsuite_run(suite)

        testsuite_results(testresult)

        self.assertEqual(testsummary, expected_results)
Exemple #3
0
 def test_testsuite_results_error(self):
     expected_results = {
         'test_test1.py': ['Test_Test', 'Test_Test2'],
         'test_test2.py': ['Test_Test21', 'Test_Test22']
     }
     suite, testsummary = testsuite_get('./dir_error', allowdupe=True)
     testresult = testsuite_results(testsuite_run(suite))
     self.assertEquals(testresult['#errors'], 2)
Exemple #4
0
    def test_run(self):
        suite, testsummary = testsuite_get(
            './dir_deep',
            allowdupe=True,
            specific_files=['subdir/subdir/test_test3.py'])

        testresult = testsuite_results(testsuite_run(suite))
        self.assertEquals(testresult['#errors'], 0)
        self.assertEquals(testresult['#tests'], 6)
Exemple #5
0
    def test_testsuite_results_failures(self):

        expected_results = {
            'test_test1.py': ['Test_Test', 'Test_Test2'],
            'test_test2.py': ['Test_Test21', 'Test_Test22']
        }
        suite, testsummary = testsuite_get('./dir_fail')
        testresult = testsuite_results(testsuite_run(suite))
        self.assertEquals(testresult['#failures'], 2)
 def test_ignore(self):
     expected_results = {'test_test1.py': ['Test_Test', 'Test_Test2'], 'test_test2.py': ['Test_Test21', 'Test_Test22']}
     suite, testsummary = testsuite_get('./dir_error',allowdupe=True,ignoredir=['./dir_error/subdir'])
     testresult = testsuite_results(testsuite_run(suite))
     self.assertEquals(testresult['#errors'],1)
 def test_testsuite_results_failures(self):
     
     expected_results = {'test_test1.py': ['Test_Test', 'Test_Test2'], 'test_test2.py': ['Test_Test21', 'Test_Test22']}
     suite, testsummary = testsuite_get('./dir_fail')
     testresult = testsuite_results(testsuite_run(suite))
     self.assertEquals(testresult['#failures'],2)