(self)
| 4898 | |
| 4899 | @unittest.skipIf(sys.platform != 'win32', "Can only test junctions with creation on win32.") |
| 4900 | def test_attributes_junctions(self): |
| 4901 | dirname = os.path.join(self.path, "tgtdir") |
| 4902 | os.mkdir(dirname) |
| 4903 | |
| 4904 | import _winapi |
| 4905 | try: |
| 4906 | _winapi.CreateJunction(dirname, os.path.join(self.path, "srcjunc")) |
| 4907 | except OSError: |
| 4908 | raise unittest.SkipTest('creating the test junction failed') |
| 4909 | |
| 4910 | entries = self.get_entries(['srcjunc', 'tgtdir']) |
| 4911 | self.assertEqual(entries['srcjunc'].is_junction(), True) |
| 4912 | self.assertEqual(entries['tgtdir'].is_junction(), False) |
| 4913 | |
| 4914 | def get_entry(self, name): |
| 4915 | path = self.bytes_path if isinstance(name, bytes) else self.path |
nothing calls this directly
no test coverage detected