Example #1
0
    def test_list_tests(self):
        class ModuleImportFailure(TestSuite):
            pass

        # get out test suite and add in our mock of python's failure module to
        # make sure list_tests skips it
        suite = self._get_suite_groupings()
        suite.addTest(ModuleImportFailure())

        tests = list(list_tests(suite))
        self.assert_test_strings('aa,ac,bb,bc,cc', tests)
Example #2
0
    def test_list_tests(self):
        class ModuleImportFailure(TestSuite):
            pass

        # get out test suite and add in our mock of python's failure module to
        # make sure list_tests skips it
        suite = self._get_suite_groupings()
        suite.addTest(ModuleImportFailure())

        tests = list(list_tests(suite))
        self.assert_test_strings('aa,ac,bb,bc,cc', tests)
Example #3
0
 def test_misc(self):
     # misc stuff to hit our 100% coverage 
     suite = discover_tests(self.start_dir, pattern=self.pattern)
     for t in list_tests(suite):
         t.run()
Example #4
0
 def _check_discover(self, labels, expected):
     suite = discover_tests(self.start_dir, labels=labels, 
         pattern=self.pattern)
     tests = list_tests(suite)
     self.assert_test_strings(expected, tests)
Example #5
0
 def test_misc(self):
     # misc stuff to hit our 100% coverage
     suite = discover_tests(self.start_dir, pattern=self.pattern)
     for t in list_tests(suite):
         t.run()
Example #6
0
 def _check_discover(self, labels, expected):
     suite = discover_tests(self.start_dir,
                            labels=labels,
                            pattern=self.pattern)
     tests = list_tests(suite)
     self.assert_test_strings(expected, tests)