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

Suppress warnings about pytest trying to collect TestProject #378

Merged
merged 1 commit into from
Jun 19, 2020

Conversation

YannickJadoul
Copy link
Member

Fixes #372

We (probably) need to use this __test__ = False attribute, because it's from .test_projects import TestProject that causes the warning. The test_projects subfolder is not the issue, since base.py does not have the test_ prefix.

Alternatively, we could have a new_base_project function, similar to new_c_project?

@YannickJadoul
Copy link
Member Author

@joerick The warnings are gone, so if this 4a335f4 fixes the unrelated Travis CI-Python 3.6-SSL error, this is ready for review (?) and merging.

@YannickJadoul
Copy link
Member Author

So Travis CI still fails, even with the 62f88a2 commit (amended 4a335f4, where I had forgotten to change C:\Python36 into C:\Python37). Let's hope Travis fixes this, and roll back that second commit?

@YannickJadoul YannickJadoul force-pushed the ignore-TestProject branch 3 times, most recently from 1432181 to 8fe6875 Compare June 17, 2020 17:44
@YannickJadoul
Copy link
Member Author

@mayeut Since you keep on providing us with SSL patches for macOS, do you know anything about issues on Windows with SSL? Travis CI apparently uses Windows Server 1809, so maybe something is too old there?

This seems to be relevant, but I cannot get it to work on Travis: https://bugs.python.org/issue36011

@mayeut
Copy link
Member

mayeut commented Jun 17, 2020

@YannickJadoul,
the issue on Windows seems indeed to be the one you linked to.
It's unrelated to why a patch was needed on macOS for CPython 3.4/3.5 and I was unaware of the Windows one.

The method from http://www.chawn.com/RootCerts.htm should work. (also for reference, http://woshub.com/updating-trusted-root-certificates-in-windows-10/)

@YannickJadoul YannickJadoul force-pushed the ignore-TestProject branch 3 times, most recently from 3d1b0c7 to 3f3381d Compare June 17, 2020 21:24
@YannickJadoul
Copy link
Member Author

Amazing! That works!
Thank you very much, @mayeut! Would have taken me a lot longer to figure out :-)

@joerick joerick merged commit a1db0f7 into pypa:master Jun 19, 2020
@YannickJadoul YannickJadoul deleted the ignore-TestProject branch June 20, 2020 22:20
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.

PytestCollectionWarning: cannot collect test class 'TestProject' because it has a __init__ constructor
3 participants