(self, pytester: Pytester)
| 381 | ) |
| 382 | |
| 383 | def test_verbose_skip_reason(self, pytester: Pytester) -> None: |
| 384 | pytester.makepyfile( |
| 385 | """ |
| 386 | import pytest |
| 387 | |
| 388 | @pytest.mark.skip(reason="123") |
| 389 | def test_1(): |
| 390 | pass |
| 391 | |
| 392 | @pytest.mark.xfail(reason="456") |
| 393 | def test_2(): |
| 394 | pass |
| 395 | |
| 396 | @pytest.mark.xfail(reason="789") |
| 397 | def test_3(): |
| 398 | assert False |
| 399 | |
| 400 | @pytest.mark.xfail(reason="") |
| 401 | def test_4(): |
| 402 | assert False |
| 403 | |
| 404 | @pytest.mark.skip |
| 405 | def test_5(): |
| 406 | pass |
| 407 | |
| 408 | @pytest.mark.xfail |
| 409 | def test_6(): |
| 410 | pass |
| 411 | |
| 412 | def test_7(): |
| 413 | pytest.skip() |
| 414 | |
| 415 | def test_8(): |
| 416 | pytest.skip("888 is great") |
| 417 | |
| 418 | def test_9(): |
| 419 | pytest.xfail() |
| 420 | |
| 421 | def test_10(): |
| 422 | pytest.xfail("It's 🕙 o'clock") |
| 423 | |
| 424 | @pytest.mark.skip( |
| 425 | reason="1 cannot do foobar because baz is missing due to I don't know what" |
| 426 | ) |
| 427 | def test_long_skip(): |
| 428 | pass |
| 429 | |
| 430 | @pytest.mark.xfail( |
| 431 | reason="2 cannot do foobar because baz is missing due to I don't know what" |
| 432 | ) |
| 433 | def test_long_xfail(): |
| 434 | print(1 / 0) |
| 435 | """ |
| 436 | ) |
| 437 | |
| 438 | common_output = [ |
| 439 | "test_verbose_skip_reason.py::test_1 SKIPPED (123) *", |
| 440 | "test_verbose_skip_reason.py::test_2 XPASS (456) *", |
nothing calls this directly
no test coverage detected