diff options
author | Franz Wöllert <franz.woellert@gmail.com> | 2018-07-29 14:47:09 +0200 |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2018-07-29 13:47:09 +0100 |
commit | d2e902e4fb304f27e4a72356efbc1fc26be3935d (patch) | |
tree | 04a6fcc9f9e2e02a9ea6412834d05e1d4610d42a /Lib/test | |
parent | b7fd73896db5666020e382c010b8da900260ede4 (diff) | |
download | cpython-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.py | 4 |
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') |