Skip to content

Fix AssertionError when AUTO cases are requested outside a "test_" module #320

Merged
smarie merged 7 commits into
smarie:mainfrom
michele-riva:fix_issue_309
Nov 21, 2023
Merged

Fix AssertionError when AUTO cases are requested outside a "test_" module #320
smarie merged 7 commits into
smarie:mainfrom
michele-riva:fix_issue_309

Conversation

@michele-riva

Copy link
Copy Markdown
Contributor

Fixes #309

@michele-riva

Copy link
Copy Markdown
Contributor Author

PR is good to go from my side. @smarie, feel free to add any suggestions

Comment thread src/pytest_cases/case_parametrizer_new.py Outdated
Comment thread src/pytest_cases/case_parametrizer_new.py Outdated
@smarie

smarie commented Nov 20, 2023

Copy link
Copy Markdown
Owner

Thanks @michele-riva ! I made a few minor comments

michele-riva and others added 2 commits November 21, 2023 06:50
Co-authored-by: Sylvain Marié <sylvain.marie@schneider-electric.com>
Co-authored-by: Sylvain Marié <sylvain.marie@schneider-electric.com>
@michele-riva

Copy link
Copy Markdown
Contributor Author

Thanks for the suggestions, @smarie. I have just implemented them.

Comment thread docs/changelog.md
@smarie

smarie commented Nov 21, 2023

Copy link
Copy Markdown
Owner

All good, thanks @michele-riva !

@smarie smarie merged commit 998429f into smarie:main Nov 21, 2023
@mroeschke

Copy link
Copy Markdown

This broke a use case where we defined our "tests" in bench_*.py which was defined in https://docs.pytest.org/en/stable/reference/reference.html#confval-python_files and this worked in 3.8.1.

It would be nice if this used the pytest config to determine where to look for AUTO cases

@smarie

smarie commented Jan 13, 2024

Copy link
Copy Markdown
Owner

I was not aware of this possibility @mroeschke ! And since I have been designing pytest-cases just for this (creating benchmarks) I really agree with fixing this. Let's move this to an explicit issue and discuss possible workarounds

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.

AUTO cases in conftest: AssertionError

3 participants