Skip to content

Test fail with pytest5 release due to syntax change #158

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

Closed
scarabeusiv opened this issue Sep 26, 2019 · 2 comments · Fixed by #335
Closed

Test fail with pytest5 release due to syntax change #158

scarabeusiv opened this issue Sep 26, 2019 · 2 comments · Fixed by #335

Comments

@scarabeusiv
Copy link

[   12s] =================================== FAILURES ===================================
[   12s] _____________ TestSchemaUnmarshal.test_string_format_invalid_value _____________
[   12s] 
[   12s] self = <test_schemas.TestSchemaUnmarshal object at 0x7fbd89b5e2e8>
[   12s] 
[   12s]     def test_string_format_invalid_value(self):
[   12s]         custom_format = 'custom'
[   12s]         schema = Schema('string', schema_format=custom_format)
[   12s]         value = 'x'
[   12s]     
[   12s]         with pytest.raises(
[   12s] >           InvalidSchemaValue, message='Failed to format value'
[   12s]         ):
[   12s] E       TypeError: Unexpected keyword arguments passed to pytest.raises: message
[   12s] E       Use context-manager form instead?
[   12s] 
[   12s] tests/unit/schema/test_schemas.py:171: TypeError
[   12s] =================== 1 failed, 288 passed, 1 xpassed in 0.91s ===================

As you have hardcoded pytest version on travis it is not exhibited there.

@p1c2u
Copy link
Collaborator

p1c2u commented May 21, 2021

python2 support dropped and updated pytest to version 5 hence closing.

@p1c2u p1c2u closed this as completed May 21, 2021
@p1c2u p1c2u linked a pull request May 21, 2021 that will close this issue
@Apteryks
Copy link

Packagers: note that this fix was made right after the latest release 0.14.2, so you'll want to skip this test if you are packaging 0.14.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants