Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utils: tweak blackbox test assertion message #872

Conversation

benoit-pierre
Copy link
Member

I noticed that after exporting support for blackbox tests the assertion message on failure changed from:

_____________________________ TestBlackboxReplays.test_carry_upper_spacing6 ______________________________
bb = <test.test_blackbox.TestBlackboxReplays object at 0x14cb56555f98>
>   new_f = lambda bb: (f(bb), replay(bb, name, test))
E   AssertionError: test_carry_upper_spacing6
E
E       "TEFT": "{<}test",
E       "W-G": "{^ing\nwith}",
E
E     > TEFT/W-G  ' TESTING\nWITH'
E       W-G       ' TESTING\nwithing\nwith'
E
E   assert ' TESTING\nwith' == ' TESTING\nWITH'
E        TESTING
E     - with
E     + WITH
test/test_blackbox.py:117: AssertionError
================================== 1 failed, 132 passed in 0.91 seconds ==================================

to:

________________________________ TestsBlackbox.test_carry_upper_spacing6 _________________________________
bb = <test.test_blackbox.TestsBlackbox object at 0x154dd5d1fa58>
>   new_f = lambda bb: (f(bb), replay(bb, name, test))
E   AssertionError: test_carry_upper_spacing6
E
E     "TEFT": "{<}test",
E     "W-G": "{^ing\nwith}",
E
E   > TEFT/W-G  ' TESTING\nWITH'
E     W-G       ' TESTING\nwithing\nwith'
plover_build_utils/testing.py:113: AssertionError
================================== 1 failed, 132 passed in 0.79 seconds ==================================

So tweak it to add back the resulting output:

________________________________ TestsBlackbox.test_carry_upper_spacing6 _________________________________
bb = <test.test_blackbox.TestsBlackbox object at 0x151e97c14a58>
>   new_f = lambda bb: (f(bb), replay(bb, name, test))
E   AssertionError: test_carry_upper_spacing6
E
E     "TEFT": "{<}test",
E     "W-G": "{^ing\nwith}",
E
E   > TEFT/W-G  ' TESTING\nWITH'
E     W-G       ' TESTING\nwithing\nwith'
E
E      ' TESTING\nwith'
E   != ' TESTING\nWITH'
plover_build_utils/testing.py:118: AssertionError
================================== 1 failed, 132 passed in 0.75 seconds ==================================

@morinted morinted merged commit a564116 into openstenoproject:master Dec 4, 2017
@benoit-pierre benoit-pierre deleted the tweak_blackbox_assertion_message branch December 4, 2017 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants