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

Prevent PytestCollectionWarning for TestRequest, TestResponse #257

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

vbraun
Copy link
Contributor

@vbraun vbraun commented Mar 4, 2024

Prevents mildly annoying warnings in pytest of the form:

PytestCollectionWarning: cannot collect test class 'TestResponse' because it has a __init__ constructor (from: test/test_foo.py)
    class TestResponse(webob.Response):

This has already been fixed for TestApp in 0339515, but TestRequest and TestResponse were missed. But pytest will try to collect all classes whose name starts with "Test". A quick grep confirms that these three are the only webtest classes starting with "Test".

Prevents mildly annoying warnings in pytest of the form:

PytestCollectionWarning: cannot collect test class 'TestResponse' because it has a __init__ constructor (from: test/test_foo.py)
    class TestResponse(webob.Response):

This has already been fixed for TestApp in
0339515, but TestRequest and
TestResponse were missed. But pytest will try to collect all classes
whose name starts with "Test". A quick grep confirms that these three
are the only webtest classes starting with "Test".
@gawel gawel merged commit 5495860 into Pylons:main Mar 4, 2024
18 checks passed
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.

2 participants