Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)

src/m/e/mediadrop-HEAD/mediadrop/plugin/tests/events_test.py   mediadrop(Download)
    def test_can_unroll_lists(self):
        event = GeneratorEvent([])
        event.post_observers.append(lambda: [1, 2, 3])
        event.post_observers.append(lambda: ('a', 'b'))
 
        assert_equals([1, 2, 3, 'a', 'b'], list(event()))
 
    def test_can_return_non_iterable_items(self):
        event = GeneratorEvent([])
        event.post_observers.append(lambda: [1, ])
    def test_can_return_non_iterable_items(self):
        event = GeneratorEvent([])
        event.post_observers.append(lambda: [1, ])
        event.post_observers.append(lambda: None)
        event.post_observers.append(lambda: 5)