Beispiel #1
0
 def test_when_other(self):
     m = Mock()
     p = maybe_promise(m)
     assert isinstance(p, Thenable)
Beispiel #2
0
 def test_when_none(self):
     assert maybe_promise(None) is None
Beispiel #3
0
 def test_when_promise(self):
     p = promise()
     assert maybe_promise(p) is p
Beispiel #4
0
 def test_when_promise(self):
     p = promise()
     assert maybe_promise(p) is p
Beispiel #5
0
 def test_when_other(self):
     m = Mock()
     p = maybe_promise(m)
     assert isinstance(p, Thenable)
Beispiel #6
0
 def test_when_none(self):
     assert maybe_promise(None) is None
 def test_when_promise(self):
     p = promise()
     self.assertIs(maybe_promise(p), p)
 def test_when_none(self):
     self.assertIsNone(maybe_promise(None))
Beispiel #9
0
 def test_when_promise(self):
     p = promise()
     self.assertIs(maybe_promise(p), p)
Beispiel #10
0
 def test_when_none(self):
     self.assertIsNone(maybe_promise(None))