(self)
| 1511 | |
| 1512 | @unittest.skipIf(sys.platform != 'win32', "Can only test junctions with creation on win32.") |
| 1513 | def test_isjunction(self): |
| 1514 | with os_helper.temp_dir() as d: |
| 1515 | with os_helper.change_cwd(d): |
| 1516 | os.mkdir('tmpdir') |
| 1517 | |
| 1518 | import _winapi |
| 1519 | try: |
| 1520 | _winapi.CreateJunction('tmpdir', 'testjunc') |
| 1521 | except OSError: |
| 1522 | raise unittest.SkipTest('creating the test junction failed') |
| 1523 | |
| 1524 | self.assertTrue(ntpath.isjunction('testjunc')) |
| 1525 | self.assertFalse(ntpath.isjunction('tmpdir')) |
| 1526 | self.assertPathEqual(ntpath.realpath('testjunc'), ntpath.realpath('tmpdir')) |
| 1527 | |
| 1528 | def test_isfile_invalid_paths(self): |
| 1529 | isfile = ntpath.isfile |
nothing calls this directly
no test coverage detected