PageRenderTime 17ms CodeModel.GetById 11ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/unit_tests/test_lazy_suite.py

https://bitbucket.org/jpellerin/nose/
Python | 21 lines | 16 code | 5 blank | 0 comment | 5 complexity | 226e9e6f479b01a0e97ba6417fea35c2 MD5 | raw file
 1import unittest
 2from nose.suite import LazySuite
 3from helpers import iter_compat
 4
 5def gen():
 6    for x in range(0, 10):
 7        yield TestLazySuite.TC('test')
 8
 9class TestLazySuite(unittest.TestCase):
10
11    class TC(unittest.TestCase):
12        def test(self):
13            pass
14        
15    def test_basic_iteration(self):        
16        ls = LazySuite(gen)
17        for t in iter_compat(ls):
18            assert isinstance(t, unittest.TestCase)
19        
20if __name__ == '__main__':
21    unittest.main()