Skip to content

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

Merged
smarie merged 7 commits intosmarie: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 intosmarie:mainfrom
michele-riva:fix_issue_309

Conversation

@michele-riva
Copy link
Contributor

Fixes #309

@michele-riva
Copy link
Contributor Author

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

@smarie
Copy link
Owner

smarie commented Nov 20, 2023

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
Contributor Author

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

@smarie
Copy link
Owner

smarie commented Nov 21, 2023

All good, thanks @michele-riva !

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

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
Copy link
Owner

smarie commented Jan 13, 2024

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

Comments