summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
authorFranz Wöllert <franz.woellert@gmail.com>2018-07-29 14:47:09 +0200
committerSteve Dower <steve.dower@microsoft.com>2018-07-29 13:47:09 +0100
commitd2e902e4fb304f27e4a72356efbc1fc26be3935d (patch)
tree04a6fcc9f9e2e02a9ea6412834d05e1d4610d42a /Lib/test
parentb7fd73896db5666020e382c010b8da900260ede4 (diff)
downloadcpython-git-d2e902e4fb304f27e4a72356efbc1fc26be3935d.tar.gz
bpo-31047: Fix ntpath.abspath for invalid paths (GH-8544)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_ntpath.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py
index 1e85ad5a75..f37a9945ff 100644
--- a/Lib/test/test_ntpath.py
+++ b/Lib/test/test_ntpath.py
@@ -280,6 +280,10 @@ class TestNtpath(unittest.TestCase):
@unittest.skipUnless(nt, "abspath requires 'nt' module")
def test_abspath(self):
tester('ntpath.abspath("C:\\")', "C:\\")
+ with support.temp_cwd(support.TESTFN) as cwd_dir: # bpo-31047
+ tester('ntpath.abspath("")', cwd_dir)
+ tester('ntpath.abspath(" ")', cwd_dir + "\\ ")
+ tester('ntpath.abspath("?")', cwd_dir + "\\?")
def test_relpath(self):
tester('ntpath.relpath("a")', 'a')