def test_testsuite_run(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)
     testsuite_run(suite)
     
     self.assertEqual(testsummary,expected_results)
Exemple #2
0
    def test_testsuite_get(self):
        expected_results = {
            'test_test1.py': ['Test_Test', 'Test_Test2'],
            'test_test2.py': ['Test_Test21', 'Test_Test22']
        }
        suite, testsummary = testsuite_get('./dir')

        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)
Exemple #6
0
    def test_testsuite_run(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)
        testsuite_run(suite)

        self.assertEqual(testsummary, expected_results)
Exemple #7
0
    def test_load_bad_test_name(self):

        expected_results = {'test_test3.py': ['Test_Test33']}

        with self.assertRaises(Exception):
            suite, testsummary = testsuite_get(
                './dir_deep',
                allowdupe=True,
                specific_files=['subdir/subdir/test_test3.py'],
                specific_tests=['foobar'])
Exemple #8
0
    def test_load(self):

        expected_results = {'test_test3.py': ['Test_Test33']}

        suite, testsummary = testsuite_get(
            './dir_deep',
            allowdupe=True,
            specific_files=['subdir/subdir/test_test3.py'],
            specific_tests=['Test_Test33'])

        self.assertEquals(testsummary, expected_results)
 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_get(self):
     expected_results = {'test_test1.py': ['Test_Test', 'Test_Test2'], 'test_test2.py': ['Test_Test21', 'Test_Test22'] }
     suite, testsummary = testsuite_get('./dir')
     
     self.assertEqual(testsummary,expected_results)
 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)