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

Don't collect traits-stubs tests under pytest #1690

Merged
merged 2 commits into from
Aug 9, 2022

Conversation

mdickinson
Copy link
Member

This PR adds a pytest configuration to ignore traits-stubs when running the Traits tests. (It's fine to run the traits-stubs tests under pytest, but it needs to be done from the traits-stubs directory as a separate test run.)

Together with #1684 and #1683, this closes #1288.

Copy link
Contributor

@corranwebster corranwebster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This worked as advertised and didn't collect any traits-stubs tests. It did fail, but I presume that that is handled in other PRs.

@mdickinson
Copy link
Member Author

It did fail, but I presume that that is handled in other PRs.

Yes, it should be. Actually, at this point we should be able to merge main into this branch and see pytest pass. Let me try that ...

@mdickinson
Copy link
Member Author

mdickinson commented Aug 9, 2022

Merged main into this branch. The following sequence of instructions now gives me a clean test run with no skipped tests. (Note: python below is Python 3.10.6.)

$ python -m venv --clear ~/.venvs/traits && source ~/.venvs/traits/bin/activate
$ python -m pip install --upgrade pip
$ python -m pip install -e ".[test]"
$ python -m pip install pytest
$ pytest

Results from pytest:

=============== 1628 passed in 51.86s ================

@mdickinson mdickinson merged commit 18341f7 into main Aug 9, 2022
@mdickinson mdickinson deleted the fix/dont-collect-traits-stubs-tests branch August 9, 2022 13:20
mdickinson added a commit that referenced this pull request Aug 9, 2022
This PR adds a pytest configuration to ignore traits-stubs when running the Traits tests. (It's fine to run the traits-stubs tests under pytest, but it needs to be done from the traits-stubs directory as a separate test run.)

Together with #1684 and #1683, this closes #1288.

(cherry picked from commit 18341f7)
mdickinson added a commit that referenced this pull request Aug 9, 2022
This PR adds a pytest configuration to ignore traits-stubs when running the Traits tests. (It's fine to run the traits-stubs tests under pytest, but it needs to be done from the traits-stubs directory as a separate test run.)

Together with #1684 and #1683, this closes #1288.

(cherry picked from commit 18341f7)
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.

Support running tests with pytest
2 participants