Пример #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
Пример #2
0
 def test_is_generator(self):
     gen = look_and_say()
     self.assertIn('__init__', dir(gen))
     self.assertIn('__next__', dir(gen))
Пример #3
0
 def test_is_generator(self):
     gen = look_and_say()
     self.assertIn('__init__', dir(gen))
     self.assertIn('__next__', dir(gen))
Пример #4
0
def test_look_and_say_is_iterable():
    gen = look_and_say()
    assert '__init__' in dir(gen)
    assert '__next__' in dir(gen)
Пример #5
0
def test_look_and_say_is_iterable():
    gen = look_and_say()
    assert '__init__' in dir(gen)
    assert '__next__' in dir(gen)