(self, pytester: Pytester)
| 346 | ) |
| 347 | |
| 348 | def test_verbose_skip_reason(self, pytester: Pytester) -> None: |
| 349 | pytester.makepyfile( |
| 350 | """ |
| 351 | import pytest |
| 352 | |
| 353 | @pytest.mark.skip(reason="123") |
| 354 | def test_1(): |
| 355 | pass |
| 356 | |
| 357 | @pytest.mark.xfail(reason="456") |
| 358 | def test_2(): |
| 359 | pass |
| 360 | |
| 361 | @pytest.mark.xfail(reason="789") |
| 362 | def test_3(): |
| 363 | assert False |
| 364 | |
| 365 | @pytest.mark.xfail(reason="") |
| 366 | def test_4(): |
| 367 | assert False |
| 368 | |
| 369 | @pytest.mark.skip |
| 370 | def test_5(): |
| 371 | pass |
| 372 | |
| 373 | @pytest.mark.xfail |
| 374 | def test_6(): |
| 375 | pass |
| 376 | |
| 377 | def test_7(): |
| 378 | pytest.skip() |
| 379 | |
| 380 | def test_8(): |
| 381 | pytest.skip("888 is great") |
| 382 | |
| 383 | def test_9(): |
| 384 | pytest.xfail() |
| 385 | |
| 386 | def test_10(): |
| 387 | pytest.xfail("It's 🕙 o'clock") |
| 388 | """ |
| 389 | ) |
| 390 | result = pytester.runpytest("-v") |
| 391 | result.stdout.fnmatch_lines( |
| 392 | [ |
| 393 | "test_verbose_skip_reason.py::test_1 SKIPPED (123) *", |
| 394 | "test_verbose_skip_reason.py::test_2 XPASS (456) *", |
| 395 | "test_verbose_skip_reason.py::test_3 XFAIL (789) *", |
| 396 | "test_verbose_skip_reason.py::test_4 XFAIL *", |
| 397 | "test_verbose_skip_reason.py::test_5 SKIPPED (unconditional skip) *", |
| 398 | "test_verbose_skip_reason.py::test_6 XPASS *", |
| 399 | "test_verbose_skip_reason.py::test_7 SKIPPED *", |
| 400 | "test_verbose_skip_reason.py::test_8 SKIPPED (888 is great) *", |
| 401 | "test_verbose_skip_reason.py::test_9 XFAIL *", |
| 402 | "test_verbose_skip_reason.py::test_10 XFAIL (It's 🕙 o'clock) *", |
| 403 | ] |
| 404 | ) |
| 405 |
nothing calls this directly
no test coverage detected