(pytester: Pytester)
| 2460 | |
| 2461 | |
| 2462 | def test_full_output_vvv(pytester: Pytester) -> None: |
| 2463 | pytester.makepyfile( |
| 2464 | r""" |
| 2465 | def crash_helper(m): |
| 2466 | assert 1 == 2 |
| 2467 | def test_vvv(): |
| 2468 | crash_helper(500 * "a") |
| 2469 | """ |
| 2470 | ) |
| 2471 | result = pytester.runpytest("") |
| 2472 | # without -vvv, the passed args are truncated |
| 2473 | expected_non_vvv_arg_line = "m = 'aaaaaaaaaaaaaaa*..aaaaaaaaaaaa*" |
| 2474 | result.stdout.fnmatch_lines( |
| 2475 | [ |
| 2476 | expected_non_vvv_arg_line, |
| 2477 | "test_full_output_vvv.py:2: AssertionError", |
| 2478 | ], |
| 2479 | ) |
| 2480 | # double check that the untruncated part is not in the output |
| 2481 | expected_vvv_arg_line = "m = '{}'".format(500 * "a") |
| 2482 | result.stdout.no_fnmatch_line(expected_vvv_arg_line) |
| 2483 | |
| 2484 | # but with "-vvv" the args are not truncated |
| 2485 | result = pytester.runpytest("-vvv") |
| 2486 | result.stdout.fnmatch_lines( |
| 2487 | [ |
| 2488 | expected_vvv_arg_line, |
| 2489 | "test_full_output_vvv.py:2: AssertionError", |
| 2490 | ] |
| 2491 | ) |
| 2492 | result.stdout.no_fnmatch_line(expected_non_vvv_arg_line) |
| 2493 | |
| 2494 | |
| 2495 | def test_dict_extra_items_preserve_insertion_order(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected