summaryrefslogtreecommitdiff
path: root/testing/test_pytester.py
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2020-01-29 03:07:35 +0100
committerDaniel Hahler <git@thequod.de>2020-01-29 03:07:35 +0100
commit55e5817570e2b017ddced7053f940e78b5c6b35f (patch)
treeae6e2298c7b182fde69ea532c23bbba80ad7c153 /testing/test_pytester.py
parent3ccf2a5e615bc238857d93292ac8d693491a15d7 (diff)
parent8e1d59a8ddba34495bf3f2d0cd3d2f17e9dbc8af (diff)
downloadpytest-55e5817570e2b017ddced7053f940e78b5c6b35f.tar.gz
Merge master into features
Diffstat (limited to 'testing/test_pytester.py')
-rw-r--r--testing/test_pytester.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/testing/test_pytester.py b/testing/test_pytester.py
index ad951fdf5..d9230f90b 100644
--- a/testing/test_pytester.py
+++ b/testing/test_pytester.py
@@ -704,3 +704,13 @@ def test_testdir_outcomes_with_multiple_errors(testdir):
result.assert_outcomes(error=2)
assert result.parseoutcomes() == {"error": 2}
+
+
+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"