Parametrized test not collected if test named specified in command line issue#649.
(pytester: Pytester)
| 388 | |
| 389 | |
| 390 | def test_parametrized_collected_from_command_line(pytester: Pytester) -> None: |
| 391 | """Parametrized test not collected if test named specified in command |
| 392 | line issue#649.""" |
| 393 | py_file = pytester.makepyfile( |
| 394 | """ |
| 395 | import pytest |
| 396 | @pytest.mark.parametrize("arg", [None, 1.3, "2-3"]) |
| 397 | def test_func(arg): |
| 398 | pass |
| 399 | """ |
| 400 | ) |
| 401 | file_name = os.path.basename(py_file) |
| 402 | rec = pytester.inline_run(file_name + "::" + "test_func") |
| 403 | rec.assertoutcome(passed=3) |
| 404 | |
| 405 | |
| 406 | def test_parametrized_collect_with_wrong_args(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected