Exemple #1
0
 def test_when_other(self):
     m = Mock()
     p = maybe_promise(m)
     assert isinstance(p, Thenable)
Exemple #2
0
 def test_when_none(self):
     assert maybe_promise(None) is None
Exemple #3
0
 def test_when_promise(self):
     p = promise()
     assert maybe_promise(p) is p
Exemple #4
0
 def test_when_promise(self):
     p = promise()
     assert maybe_promise(p) is p
Exemple #5
0
 def test_when_other(self):
     m = Mock()
     p = maybe_promise(m)
     assert isinstance(p, Thenable)
Exemple #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))
Exemple #9
0
 def test_when_promise(self):
     p = promise()
     self.assertIs(maybe_promise(p), p)
Exemple #10
0
 def test_when_none(self):
     self.assertIsNone(maybe_promise(None))