MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_relpath_rootdir

Function test_relpath_rootdir

testing/test_skipping.py:1430–1444  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

1428
1429
1430def test_relpath_rootdir(pytester: Pytester) -> None:
1431 pytester.makepyfile(
1432 **{
1433 "tests/test_1.py": """
1434 import pytest
1435 @pytest.mark.skip()
1436 def test_pass():
1437 pass
1438 """,
1439 }
1440 )
1441 result = pytester.runpytest("-rs", "tests/test_1.py", "--rootdir=tests")
1442 result.stdout.fnmatch_lines(
1443 ["SKIPPED [[]1[]] tests/test_1.py:2: unconditional skip"]
1444 )
1445
1446
1447def test_skip_using_reason_works_ok(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected