(self)
| 1394 | |
| 1395 | @unittest.skipIf(sys.platform != 'win32', "Can only test junctions with creation on win32.") |
| 1396 | def test_isjunction(self): |
| 1397 | with os_helper.temp_dir() as d: |
| 1398 | with os_helper.change_cwd(d): |
| 1399 | os.mkdir('tmpdir') |
| 1400 | |
| 1401 | import _winapi |
| 1402 | try: |
| 1403 | _winapi.CreateJunction('tmpdir', 'testjunc') |
| 1404 | except OSError: |
| 1405 | raise unittest.SkipTest('creating the test junction failed') |
| 1406 | |
| 1407 | self.assertTrue(ntpath.isjunction('testjunc')) |
| 1408 | self.assertFalse(ntpath.isjunction('tmpdir')) |
| 1409 | self.assertPathEqual(ntpath.realpath('testjunc'), ntpath.realpath('tmpdir')) |
| 1410 | |
| 1411 | def test_isfile_invalid_paths(self): |
| 1412 | isfile = ntpath.isfile |
nothing calls this directly
no test coverage detected