5 from cStringIO import StringIO
6 from nose.result import _TextTestResult
7 here = os.path.dirname(__file__)
8 support = os.path.join(here, 'support')
11 class TestRunner(unittest.TextTestRunner):
12 def _makeResult(self):
13 self.result = _TextTestResult(
14 self.stream, self.descriptions, self.verbosity)
18 class TestNoseTestCollector(unittest.TestCase):
20 def test_skip_works_with_collector(self):
23 runner = TestRunner(stream=stream, verbosity=verbosity)
26 # we don't need to see our own warnings
27 warnings.filterwarnings(action='ignore',
28 category=RuntimeWarning,
29 module='nose.plugins.manager')
32 os.chdir(os.path.join(support, 'issue038'))
35 argv=['test_collector', '-v', 'nose.collector'],
40 out = stream.getvalue()
41 assert runner.result.wasSuccessful()
42 assert 'SKIP' in out, "SKIP not found in %s" % out
45 if __name__ == '__main__':