Tags: smarie/python-pytest-cases
Tags
Fixed compat with pytest 8.4.0 (#367) * - Fixed `AttributeError: 'MiniMetafunc' object has no attribute '_params_directness'` when a case function is parametrized or requires a fixtures, with pytest 8.4.0. Fixed #365 - Fixed `ValueError: The provided fixture function does not seem to be a fixture` with `@fixture_ref` with pytest 8.4.0. Fixed #364 * Updated license * Removed useless code in nox file * Removed useless requirement for packaging as setup dependency, and added a few comments/docstring * Added additional combinations in the cicd matrix * Enabled support for python 3.14 --------- Co-authored-by: Sylvain MARIE <sylvain.marie@se.com>
Fix ScopeMismatch with parametrized cases (#317) * tests: add test for issue #311 * fix: propagate scope in ...ParamAlternative * fix: mangle fixture name for conftest Fixtures that are to be injected in conftest.py will be available globally. If we do not include this information in the name of the autogenerated fixtures, we may risk causing a conflict if another test/case/conftest uses parametrization on the same tests. * fix: avoid conflict also if __init__.py exists When conftest is in a package rather than in a mere folder, its name is "fully qualified". Perhaps there would be no need to actually add the scope in this case, but better safe than sorry. * Do not pass on None as scope Make sure that the default scope always is "function" so as to avoid issues with pytest <= 6, which 'translates' the scope string kwarg into an index from a list. The list does not contain None. * More explicit None scope replacement As suggested by @smarie * Add note and example for conftest qualname * Test correctness of scopes As suggested by @smarie * Add changelog for #317 * Update docs/changelog.md --------- Co-authored-by: Sylvain Marié <sylvain.marie@schneider-electric.com>
PreviousNext