summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ntpath.py
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2019-10-03 15:31:03 (GMT)
committerGitHub <noreply@github.com>2019-10-03 15:31:03 (GMT)
commita0e3d27e4e3cb5b67e325df080fb18b70c2910cf (patch)
tree53315214f83bc774e1c9dc1e0ab1887527208205 /Lib/test/test_ntpath.py
parent098e25672f1c3578855d5ded4f5147795c9ed956 (diff)
downloadcpython-a0e3d27e4e3cb5b67e325df080fb18b70c2910cf.zip
cpython-a0e3d27e4e3cb5b67e325df080fb18b70c2910cf.tar.gz
cpython-a0e3d27e4e3cb5b67e325df080fb18b70c2910cf.tar.bz2
bpo-38355: Fix ntpath.realpath failing on sys.executable (GH-16551)
Diffstat (limited to 'Lib/test/test_ntpath.py')
-rw-r--r--Lib/test/test_ntpath.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py
index 2f0faf9..e0ec441 100644
--- a/Lib/test/test_ntpath.py
+++ b/Lib/test/test_ntpath.py
@@ -329,16 +329,14 @@ class TestNtpath(NtpathTestCase):
self.addCleanup(support.unlink, ABSTFN + "c")
self.addCleanup(support.unlink, ABSTFN + "a")
- P = "\\\\?\\"
-
os.symlink(ABSTFN, ABSTFN)
- self.assertPathEqual(ntpath.realpath(ABSTFN), P + ABSTFN)
+ self.assertPathEqual(ntpath.realpath(ABSTFN), ABSTFN)
# cycles are non-deterministic as to which path is returned, but
# it will always be the fully resolved path of one member of the cycle
os.symlink(ABSTFN + "1", ABSTFN + "2")
os.symlink(ABSTFN + "2", ABSTFN + "1")
- expected = (P + ABSTFN + "1", P + ABSTFN + "2")
+ expected = (ABSTFN + "1", ABSTFN + "2")
self.assertPathIn(ntpath.realpath(ABSTFN + "1"), expected)
self.assertPathIn(ntpath.realpath(ABSTFN + "2"), expected)
@@ -357,14 +355,14 @@ class TestNtpath(NtpathTestCase):
expected)
os.symlink(ntpath.basename(ABSTFN) + "a\\b", ABSTFN + "a")
- self.assertPathEqual(ntpath.realpath(ABSTFN + "a"), P + ABSTFN + "a")
+ self.assertPathEqual(ntpath.realpath(ABSTFN + "a"), ABSTFN + "a")
os.symlink("..\\" + ntpath.basename(ntpath.dirname(ABSTFN))
+ "\\" + ntpath.basename(ABSTFN) + "c", ABSTFN + "c")
- self.assertPathEqual(ntpath.realpath(ABSTFN + "c"), P + ABSTFN + "c")
+ self.assertPathEqual(ntpath.realpath(ABSTFN + "c"), ABSTFN + "c")
# Test using relative path as well.
- self.assertPathEqual(ntpath.realpath(ntpath.basename(ABSTFN)), P + ABSTFN)
+ self.assertPathEqual(ntpath.realpath(ntpath.basename(ABSTFN)), ABSTFN)
@support.skip_unless_symlink
@unittest.skipUnless(HAVE_GETFINALPATHNAME, 'need _getfinalpathname')