示例#1
0
 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)
示例#3
0
def test_get_if():
    p1 = Promise()
    p1.fulfill(5)
    v = p1.get()
    assert p1.isFulfilled
    assert_equals(5, v)