コード例 #1
0
 def get(self, timeout=None):
     if self.isPending:
         self.pipeline.execute()
     return Promise.get(self, timeout)
コード例 #2
0
def test_get_if():
    p1 = Promise()
    p1.fulfill(5)
    v = p1.get()
    assert p1.isFulfilled()
    assert_equals(5, v)
コード例 #3
0
ファイル: TestExtraFeatures.py プロジェクト: pyzh/aplus
def test_get_if():
    p1 = Promise()
    p1.fulfill(5)
    v = p1.get()
    assert p1.isFulfilled
    assert_equals(5, v)