Lines Matching refs:ABSTFN

260         ABSTFN = ntpath.abspath(support.TESTFN)
261 open(ABSTFN, "wb").close()
262 self.addCleanup(support.unlink, ABSTFN)
263 self.addCleanup(support.unlink, ABSTFN + "1")
265 os.symlink(ABSTFN, ABSTFN + "1")
266 self.assertPathEqual(ntpath.realpath(ABSTFN + "1"), ABSTFN)
267 self.assertPathEqual(ntpath.realpath(os.fsencode(ABSTFN + "1")),
268 os.fsencode(ABSTFN))
273 ABSTFN = ntpath.abspath(support.TESTFN)
274 open(ABSTFN, "wb").close()
275 self.addCleanup(support.unlink, ABSTFN)
276 self.addCleanup(support.unlink, ABSTFN + "1")
278 os.symlink(ABSTFN, ntpath.relpath(ABSTFN + "1"))
279 self.assertPathEqual(ntpath.realpath(ABSTFN + "1"), ABSTFN)
284 ABSTFN = ntpath.abspath(support.TESTFN)
285 os.mkdir(ABSTFN)
286 self.addCleanup(support.rmtree, ABSTFN)
288 with support.change_cwd(ABSTFN):
299 os.symlink(ABSTFN + r"\broken", "broken4")
303 ABSTFN + r"\missing")
305 ABSTFN + r"\missing\foo")
309 ABSTFN + r"\broken\bar")
311 ABSTFN + r"\broken\bar\baz")
313 ABSTFN + r"\self\self\missing")
315 ABSTFN + r"\subdir\parent\subdir\parent\missing")
317 ABSTFN + r"\missing")
319 ABSTFN + r"\missing")
322 os.fsencode(ABSTFN + r"\missing"))
324 os.fsencode(ABSTFN + r"\missing\foo"))
326 os.fsencode(ABSTFN + r"\broken\bar"))
328 os.fsencode(ABSTFN + r"\broken\bar\baz"))
330 os.fsencode(ABSTFN + r"\self\self\missing"))
332 os.fsencode(ABSTFN + r"\subdir\parent\subdir\parent\missing"))
334 os.fsencode(ABSTFN + r"\missing"))
336 os.fsencode(ABSTFN + r"\missing"))
343 ABSTFN = ntpath.abspath(support.TESTFN)
344 self.addCleanup(support.unlink, ABSTFN)
345 self.addCleanup(support.unlink, ABSTFN + "1")
346 self.addCleanup(support.unlink, ABSTFN + "2")
347 self.addCleanup(support.unlink, ABSTFN + "y")
348 self.addCleanup(support.unlink, ABSTFN + "c")
349 self.addCleanup(support.unlink, ABSTFN + "a")
351 os.symlink(ABSTFN, ABSTFN)
352 self.assertPathEqual(ntpath.realpath(ABSTFN), ABSTFN)
354 os.symlink(ABSTFN + "1", ABSTFN + "2")
355 os.symlink(ABSTFN + "2", ABSTFN + "1")
356 expected = (ABSTFN + "1", ABSTFN + "2")
357 self.assertPathIn(ntpath.realpath(ABSTFN + "1"), expected)
358 self.assertPathIn(ntpath.realpath(ABSTFN + "2"), expected)
360 self.assertPathIn(ntpath.realpath(ABSTFN + "1\\x"),
362 self.assertPathEqual(ntpath.realpath(ABSTFN + "1\\.."),
363 ntpath.dirname(ABSTFN))
364 self.assertPathEqual(ntpath.realpath(ABSTFN + "1\\..\\x"),
365 ntpath.dirname(ABSTFN) + "\\x")
366 os.symlink(ABSTFN + "x", ABSTFN + "y")
367 self.assertPathEqual(ntpath.realpath(ABSTFN + "1\\..\\"
368 + ntpath.basename(ABSTFN) + "y"),
369 ABSTFN + "x")
370 self.assertPathIn(ntpath.realpath(ABSTFN + "1\\..\\"
371 + ntpath.basename(ABSTFN) + "1"),
374 os.symlink(ntpath.basename(ABSTFN) + "a\\b", ABSTFN + "a")
375 self.assertPathEqual(ntpath.realpath(ABSTFN + "a"), ABSTFN + "a")
377 os.symlink("..\\" + ntpath.basename(ntpath.dirname(ABSTFN))
378 + "\\" + ntpath.basename(ABSTFN) + "c", ABSTFN + "c")
379 self.assertPathEqual(ntpath.realpath(ABSTFN + "c"), ABSTFN + "c")
382 self.assertPathEqual(ntpath.realpath(ntpath.basename(ABSTFN)), ABSTFN)
387 ABSTFN = ntpath.abspath(support.TESTFN)
388 self.addCleanup(support.unlink, ABSTFN + "3")
389 self.addCleanup(support.unlink, "\\\\?\\" + ABSTFN + "3.")
390 self.addCleanup(support.unlink, ABSTFN + "3link")
391 self.addCleanup(support.unlink, ABSTFN + "3.link")
393 with open(ABSTFN + "3", "wb") as f:
395 os.symlink(ABSTFN + "3", ABSTFN + "3link")
397 with open("\\\\?\\" + ABSTFN + "3.", "wb") as f:
399 os.symlink("\\\\?\\" + ABSTFN + "3.", ABSTFN + "3.link")
401 self.assertPathEqual(ntpath.realpath(ABSTFN + "3link"),
402 ABSTFN + "3")
403 self.assertPathEqual(ntpath.realpath(ABSTFN + "3.link"),
404 "\\\\?\\" + ABSTFN + "3.")
407 with open(ntpath.realpath(ABSTFN + "3link"), "rb") as f:
409 with open(ntpath.realpath(ABSTFN + "3.link"), "rb") as f:
413 self.assertPathEqual(ntpath.realpath("\\\\?\\" + ABSTFN + "3link"),
414 "\\\\?\\" + ABSTFN + "3")
415 self.assertPathEqual(ntpath.realpath("\\\\?\\" + ABSTFN + "3.link"),
416 "\\\\?\\" + ABSTFN + "3.")
425 ABSTFN = ntpath.abspath(support.TESTFN)
427 support.unlink(ABSTFN)
428 support.rmtree(ABSTFN)
429 os.mkdir(ABSTFN)
430 self.addCleanup(support.rmtree, ABSTFN)
432 test_dir_long = ntpath.join(ABSTFN, "MyVeryLongDirectoryName")