summaryrefslogtreecommitdiff
path: root/unit_tests/test_issue_230.py
blob: 51747b206db6eee8ed96f1cecb6d2bc412087bfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import os
import unittest2 as unittest

class TestIssue230(unittest.TestCase):

    def test_generator_yield_value(self):
        from nose.loader import TestLoader

        def test():
            pass
        def gen():
            yield test

        loader = TestLoader()
        suite = loader.loadTestsFromGenerator(gen, module=None)
        testcase = iter(suite).next()
        self.assertEqual(testcase.test.test, test)


if __name__ == '__main__':
    unittest.main()