コード例 #1
0
ファイル: assertions.py プロジェクト: farikonsec/veripy
    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
コード例 #2
0
ファイル: assertions.py プロジェクト: farikonsec/veripy
    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)
コード例 #3
0
ファイル: assertions.py プロジェクト: farikonsec/veripy
    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)
コード例 #4
0
ファイル: assertions.py プロジェクト: farikonsec/veripy
 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")