You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our codebase we chose specific way of working with pytest.mark.parametrize.
It is hard to look at tests which names are autogenerated from parameters list. To improve this we use parametrize(ids=) argument.
Unfortunately maintainability/readability of tests decreases if test cases and ids are written separately.
To resolve this issue we add some description to test cases and reuse it in ids with walrus operator.
For instance
Bug Report
In our codebase we chose specific way of working with
pytest.mark.parametrize
.It is hard to look at tests which names are autogenerated from parameters list. To improve this we use
parametrize(ids=)
argument.Unfortunately maintainability/readability of tests decreases if test cases and ids are written separately.
To resolve this issue we add some
description
to test cases and reuse it inids
with walrus operator.For instance
Mypy says here that
_test_cases
does not exist which is incorrectTo Reproduce
I have created simple playground without pytest dependency to reproduce the error
https://mypy-play.net/?mypy=master&python=3.12&flags=check-untyped-defs&gist=8f98cbc918fbf8053a14f58c8011e375
Expected Behavior
Success: no issues found in 1 source file
Actual Behavior
main.py:11: error: Name "my_call_vars" is not defined [name-defined]
Your Environment
mypy.ini
(and other config files): no specific configurationsThe text was updated successfully, but these errors were encountered: