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

Python 3.10 has new error messages #24

Open
bnavigator opened this issue Dec 11, 2021 · 1 comment
Open

Python 3.10 has new error messages #24

bnavigator opened this issue Dec 11, 2021 · 1 comment

Comments

@bnavigator
Copy link

The following tests fail with Python 3.10 due to a slightly different error message:

[   27s] =================================== FAILURES ===================================
[   27s] ______________________ test_story_empty_play_proxy_class _______________________
[   27s] tests/test_aspectlib_test.py:411: in test_story_empty_play_proxy_class
[   27s]     assert format_calls(replay._actual) == format_calls(OrderedDict([
[   27s] E   assert "stuff_1 = te...)  # raises\n" == "stuff_1 = te...)  # raises\n"
[   27s] E       stuff_1 = test_pkg1.test_pkg2.test_mod.Stuff(1, 2)
[   27s] E       stuff_1.mix(3, 4) == (1, 2, 3, 4)  # returns
[   27s] E       stuff_1.mix('a', 'b') == (1, 2, 'a', 'b')  # returns
[   27s] E     - stuff_1.meth(123) ** TypeError('meth() takes 1 positional argument but 2 were given')  # raises
[   27s] E     + stuff_1.meth(123) ** TypeError('Stuff.meth() takes 1 positional argument but 2 were given')  # raises
[   27s] E     ?                                 ++++++
[   27s] E       stuff_2 = test_pkg1.test_pkg2.test_mod.Stuff(0, 1)...
[   27s] E     
[   27s] E     ...Full output truncated (6 lines hidden), use '-vv' to show
[   27s] ----------------------------- Captured stdout call -----------------------------
[   27s] STORY/REPLAY DIFF:
[   27s]     --- expected
[   27s]     +++ actual
[   27s]     @@ -0,0 +1,8 @@
[   27s]     +stuff_1 = test_pkg1.test_pkg2.test_mod.Stuff(1, 2)
[   27s]     +stuff_1.mix(3, 4) == (1, 2, 3, 4)  # returns
[   27s]     +stuff_1.mix('a', 'b') == (1, 2, 'a', 'b')  # returns
[   27s]     +stuff_1.meth(123) ** TypeError('Stuff.meth() takes 1 positional argument but 2 were given')  # raises
[   27s]     +stuff_2 = test_pkg1.test_pkg2.test_mod.Stuff(0, 1)
[   27s]     +stuff_2.mix('a', 'b') == (0, 1, 'a', 'b')  # returns
[   27s]     +stuff_2.mix(3, 4) == (0, 1, 3, 4)  # returns
[   27s]     +stuff_2.meth(123) ** TypeError('Stuff.meth() takes 1 positional argument but 2 were given')  # raises
[   27s] ACTUAL:
[   27s]     stuff_1 = test_pkg1.test_pkg2.test_mod.Stuff(1, 2)
[   27s]     stuff_1.mix(3, 4) == (1, 2, 3, 4)  # returns
[   27s]     stuff_1.mix('a', 'b') == (1, 2, 'a', 'b')  # returns
[   27s]     stuff_1.meth(123) ** TypeError('Stuff.meth() takes 1 positional argument but 2 were given')  # raises
[   27s]     stuff_2 = test_pkg1.test_pkg2.test_mod.Stuff(0, 1)
[   27s]     stuff_2.mix('a', 'b') == (0, 1, 'a', 'b')  # returns
[   27s]     stuff_2.mix(3, 4) == (0, 1, 3, 4)  # returns
[   27s]     stuff_2.meth(123) ** TypeError('Stuff.meth() takes 1 positional argument but 2 were given')  # raises
[   27s] 
[   27s] _______________________ test_story_half_play_proxy_class _______________________
[   27s] tests/test_aspectlib_test.py:448: in test_story_half_play_proxy_class
[   27s]     assert replay.unexpected == format_calls(OrderedDict([
[   27s] E   assert "stuff_1.meth...)  # raises\n" == "stuff_1.meth...)  # raises\n"
[   27s] E       stuff_1.meth() == None  # returns
[   27s] E     - stuff_1.meth(123) ** TypeError('meth() takes 1 positional argument but 2 were given')  # raises
[   27s] E     + stuff_1.meth(123) ** TypeError('Stuff.meth() takes 1 positional argument but 2 were given')  # raises
[   27s] E     ?                                 ++++++
[   27s] E       stuff_2 = test_pkg1.test_pkg2.test_mod.Stuff(0, 1)
[   27s] E       stuff_2.mix('a', 'b') == (0, 1, 'a', 'b')  # returns
[   27s] E       stuff_2.mix(3, 4) == (0, 1, 3, 4)  # returns...
[   27s] E     
[   27s] E     ...Full output truncated (4 lines hidden), use '-vv' to show
[   27s] ----------------------------- Captured stdout call -----------------------------
[   27s] STORY/REPLAY DIFF:
[   27s]     --- expected
[   27s]     +++ actual
[   27s]     @@ -1,2 +1,8 @@
[   27s]      stuff_1 = test_pkg1.test_pkg2.test_mod.Stuff(1, 2)
[   27s]      stuff_1.mix(3, 4) == (1, 2, 3, 4)  # returns
[   27s]     +stuff_1.meth() == None  # returns
[   27s]     +stuff_1.meth(123) ** TypeError('Stuff.meth() takes 1 positional argument but 2 were given')  # raises
[   27s]     +stuff_2 = test_pkg1.test_pkg2.test_mod.Stuff(0, 1)
[   27s]     +stuff_2.mix('a', 'b') == (0, 1, 'a', 'b')  # returns
[   27s]     +stuff_2.mix(3, 4) == (0, 1, 3, 4)  # returns
[   27s]     +stuff_2.meth(123) ** TypeError('Stuff.meth() takes 1 positional argument but 2 were given')  # raises
[   27s] ACTUAL:
[   27s]     stuff_1 = test_pkg1.test_pkg2.test_mod.Stuff(1, 2)
[   27s]     stuff_1.mix(3, 4) == (1, 2, 3, 4)  # returns
[   27s]     stuff_1.meth() == None  # returns
[   27s]     stuff_1.meth(123) ** TypeError('Stuff.meth() takes 1 positional argument but 2 were given')  # raises
[   27s]     stuff_2 = test_pkg1.test_pkg2.test_mod.Stuff(0, 1)
[   27s]     stuff_2.mix('a', 'b') == (0, 1, 'a', 'b')  # returns
[   27s]     stuff_2.mix(3, 4) == (0, 1, 3, 4)  # returns
[   27s]     stuff_2.meth(123) ** TypeError('Stuff.meth() takes 1 positional argument but 2 were given')  # raises
@bnavigator
Copy link
Author

Sorry, I didn't see #22

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

No branches or pull requests

1 participant