Ejemplo n.º 1
0
def test_is_delegate():
    provider = providers.Coroutine(example)
    delegate = providers.CoroutineDelegate(provider)
    assert isinstance(delegate, providers.Delegate)
 def setUp(self):
     self.delegated = providers.Coroutine(_example)
     self.delegate = providers.CoroutineDelegate(self.delegated)
Ejemplo n.º 3
0
def test_init_with_not_coroutine():
    with raises(errors.Error):
        providers.CoroutineDelegate(providers.Object(object()))