def test_factory(): """ Test base generator's factory. """ from mixer.main import GenFactory g = GenFactory() test = g.get_fabric(int) assert -2147483647 <= test() < 2147483647 test = g.get_fabric(bool) assert test() in (True, False)
def test_factory(): """ Test base generator's factory. """ from mixer.main import GenFactory g = GenFactory() test = g.gen_maker(int)() assert -2147483647 <= next(test) < 2147483647 test = g.gen_maker(bool)() assert next(test) in (True, False)
def test_factory(self): """ Test base generator's factory. """ from mixer.main import GenFactory g = GenFactory() test = g.gen_maker(int)() self.assertTrue(-2147483647 <= next(test) < 2147483647) test = g.gen_maker(bool)() self.assertTrue(next(test) in [True, False])