Skip to content

Instantly share code, notes, and snippets.

@adamgoucher
Created May 22, 2013 02:33
Show Gist options
  • Save adamgoucher/5624886 to your computer and use it in GitHub Desktop.
Save adamgoucher/5624886 to your computer and use it in GitHub Desktop.
holy wow user facing error messages are hard.

this:

    @pytest.marks('matchers')
    def test_verify_true_with_true_condition(self):
        self.matchers.verify_true(1==1, "AAAAA")
        self.matchers.verify_true(2==3, "BBBBB")
        self.matchers.verify_true(3==4)
        # self.matchers.assert_true(4==5, "CCCCC")
        self.matchers.assert_true(4 == 5)

produces:

AssertionError: {'AssertionError': '/Users/adam/tmp/matchers/scripts/matchers.py:17', 'Verification Failures': ['BBBBB: /Users/adam/tmp/matchers/scripts/matchers.py:14', '/Users/adam/tmp/matchers/scripts/matchers.py:15']}

and this:

    @pytest.marks('matchers')
    def test_verify_true_with_true_condition(self):
        self.matchers.verify_true(1==1, "AAAAA")
        self.matchers.verify_true(2==3, "BBBBB")
        self.matchers.verify_true(3==4)
        self.matchers.assert_true(4==5, "CCCCC")
        # self.matchers.assert_true(4 == 5)

produces:

AssertionError: {'AssertionError': 'CCCCC: /Users/adam/tmp/matchers/scripts/matchers.py:16', 'Verification Failures': ['BBBBB: /Users/adam/tmp/matchers/scripts/matchers.py:14', '/Users/adam/tmp/matchers/scripts/matchers.py:15']}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment