summaryrefslogtreecommitdiff
path: root/testing/test_pytester.py
diff options
context:
space:
mode:
authorBruno Oliveira <nicoddemus@gmail.com>2020-10-12 12:13:06 -0300
committerGitHub <noreply@github.com>2020-10-12 12:13:06 -0300
commit69419cb70007514e5061f3b8d359b7da9dff82dd (patch)
treec6e61c290133eba20b2e2e8dfaf6239ef12722e5 /testing/test_pytester.py
parentcb578a918e8891120060a7ddf94471bdef8dbc56 (diff)
downloadpytest-69419cb70007514e5061f3b8d359b7da9dff82dd.tar.gz
New pytester fixture (#7854)
Diffstat (limited to 'testing/test_pytester.py')
-rw-r--r--testing/test_pytester.py13
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)