def get(self, timeout=None): if self.isPending: self.pipeline.execute() return Promise.get(self, timeout)
def test_get_if(): p1 = Promise() p1.fulfill(5) v = p1.get() assert p1.isFulfilled() assert_equals(5, v)
def test_get_if(): p1 = Promise() p1.fulfill(5) v = p1.get() assert p1.isFulfilled assert_equals(5, v)