def test_it_should_assert_not_equal_for_equal_arguments(self): try: assertions.assertNotEqual(1, 1) self.fail("did not identify that arguments were equal") except assertions.AssertionFailedError: pass
def test_it_should_use_a_custom_message_on_a_failed_not_equal_assertion( self): try: assertions.assertNotEqual(1, 1, 'something is wrong') self.fail("did not identify that arguments were equal") except assertions.AssertionFailedError, e: self.assertEqual('something is wrong', e.message)
def test_it_should_use_a_default_message_on_a_failed_not_equal_assertion( self): try: assertions.assertNotEqual(1, 1) self.fail("did not identify that arguments were equal") except assertions.AssertionFailedError, e: self.assertEqual('expected not 1 got 1', e.message)
def test_it_should_assert_not_equal_for_non_equal_arguments(self): self.assertEqual(True, assertions.assertNotEqual(1, 2), "did not identify non-equal arguments")