Example #1
0
def test_look_and_say():
    with open('tests/data_lookandsay.json') as file:
        data = json.load(file)

    l = iter(look_and_say())
    for value in data:
        assert next(l) == value
 def test_is_generator(self):
     gen = look_and_say()
     self.assertIn('__init__', dir(gen))
     self.assertIn('__next__', dir(gen))
Example #3
0
 def test_is_generator(self):
     gen = look_and_say()
     self.assertIn('__init__', dir(gen))
     self.assertIn('__next__', dir(gen))
Example #4
0
def test_look_and_say_is_iterable():
    gen = look_and_say()
    assert '__init__' in dir(gen)
    assert '__next__' in dir(gen)
def test_look_and_say_is_iterable():
    gen = look_and_say()
    assert '__init__' in dir(gen)
    assert '__next__' in dir(gen)