Ejemplo n.º 1
0
    def test_create_at_generator_generates_iterable_that_adds_interval_after_each_load(self):
        ret = create_at_generator('15:00 29 Sep 2015', 10)

        expected_result = [
            '15:00 29 Sep 2015',
            '15:10 29 Sep 2015',
            '15:20 29 Sep 2015',
            '15:30 29 Sep 2015',
            '15:40 29 Sep 2015',
        ]

        self.assertEqual(expected_result, list(map(lambda _: ret.next(), range(5))))
Ejemplo n.º 2
0
    def test_create_at_generator_creates_iterable(self):
        ret = create_at_generator('15:00 29 Sep 2015', 10)

        self.assertIsInstance(ret, collections.Iterable)