diff options
author | Bruno Oliveira <nicoddemus@gmail.com> | 2020-10-12 12:13:06 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-12 12:13:06 -0300 |
commit | 69419cb70007514e5061f3b8d359b7da9dff82dd (patch) | |
tree | c6e61c290133eba20b2e2e8dfaf6239ef12722e5 /testing/test_pytester.py | |
parent | cb578a918e8891120060a7ddf94471bdef8dbc56 (diff) | |
download | pytest-69419cb70007514e5061f3b8d359b7da9dff82dd.tar.gz |
New pytester fixture (#7854)
Diffstat (limited to 'testing/test_pytester.py')
-rw-r--r-- | testing/test_pytester.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/testing/test_pytester.py b/testing/test_pytester.py index dd3855c69..fed201daf 100644 --- a/testing/test_pytester.py +++ b/testing/test_pytester.py @@ -801,9 +801,10 @@ def test_parse_summary_line_always_plural(): def test_makefile_joins_absolute_path(testdir: Testdir) -> None: absfile = testdir.tmpdir / "absfile" - if sys.platform == "win32": - with pytest.raises(OSError): - testdir.makepyfile(**{str(absfile): ""}) - else: - p1 = testdir.makepyfile(**{str(absfile): ""}) - assert str(p1) == (testdir.tmpdir / absfile) + ".py" + p1 = testdir.makepyfile(**{str(absfile): ""}) + assert str(p1) == str(testdir.tmpdir / "absfile.py") + + +def test_testtmproot(testdir): + """Check test_tmproot is a py.path attribute for backward compatibility.""" + assert testdir.test_tmproot.check(dir=1) |