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

Fix remaining warnings from pytest while collecting tests #1206

Merged
merged 1 commit into from May 15, 2015

Conversation

@curita
Copy link
Member

@curita curita commented May 4, 2015

Running tox -e py27 -- scrapy tests --collect-only -s -rw shows that pytest issues 13 warnings from classes prefixed by Test that contain __init__ methods.

Since every TestCase we're using is a subclass from unittest.TestCase (twisted.trial.unittest.TestCase is a subclass of it too), we don't have to rely on discovering tests by their class name.

This PR overrides the default python_class=Test so the only test classes collected are the ones inherited from unittest.TestCase.

dangra added a commit that referenced this pull request May 15, 2015
Fix remaining warnings from pytest while collecting tests
@dangra dangra merged commit faba9bb into scrapy:master May 15, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@curita curita deleted the curita:clean-test-collection branch May 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.