示例#1
0
 def test_equality(self):
     m1 = PoisonMessage(1)
     assert m1 == PoisonMessage(1)
     m2 = PoisonMessage('hi')
     assert m2 == PoisonMessage('hi')
示例#2
0
 def test_properties(self):
     assert 1 == PoisonMessage(1).poisonMessage
     assert PoisonMessage(None).poisonMessage is None
     assert 'foo' == PoisonMessage('foo').poisonMessage
示例#3
0
 def test_inheritance(self):
     assert isinstance(PoisonMessage(1), PoisonMessage)
     assert isinstance(PoisonMessage('hi'), PoisonMessage)
     assert isinstance(PoisonMessage(1), ActorSystemMessage)
     assert isinstance(PoisonMessage('hi'), ActorSystemMessage)
示例#4
0
 def test_inequality(self):
     m1 = PoisonMessage(1)
     assert m1 != 1
     assert m1 != PoisonMessage('hi')
     assert m1 != PoisonMessage(0)
     assert m1 != PoisonMessage(None)
示例#5
0
 def test_equality(self):
     m1 = PoisonMessage(1)
     self.assertEqual(m1, PoisonMessage(1))
     m2 = PoisonMessage('hi')
     self.assertEqual(m2, PoisonMessage('hi'))
示例#6
0
 def test_inheritance(self):
     self.assertTrue(isinstance(PoisonMessage(1), PoisonMessage))
     self.assertTrue(isinstance(PoisonMessage('hi'), PoisonMessage))
     self.assertTrue(isinstance(PoisonMessage(1), ActorSystemMessage))
     self.assertTrue(isinstance(PoisonMessage('hi'), ActorSystemMessage))
示例#7
0
 def test_properties(self):
     self.assertEqual(1, PoisonMessage(1).poisonMessage)
     self.assertEqual(None, PoisonMessage(None).poisonMessage)
     self.assertEqual('foo', PoisonMessage('foo').poisonMessage)
示例#8
0
 def test_inequality(self):
     m1 = PoisonMessage(1)
     self.assertNotEqual(m1, 1)
     self.assertNotEqual(m1, PoisonMessage('hi'))
     self.assertNotEqual(m1, PoisonMessage(0))
     self.assertNotEqual(m1, PoisonMessage(None))