(self)
| 5174 | |
| 5175 | @unittest.skipIf(sys.platform != 'win32', "Can only test junctions with creation on win32.") |
| 5176 | def test_attributes_junctions(self): |
| 5177 | dirname = os.path.join(self.path, "tgtdir") |
| 5178 | os.mkdir(dirname) |
| 5179 | |
| 5180 | import _winapi |
| 5181 | try: |
| 5182 | _winapi.CreateJunction(dirname, os.path.join(self.path, "srcjunc")) |
| 5183 | except OSError: |
| 5184 | raise unittest.SkipTest('creating the test junction failed') |
| 5185 | |
| 5186 | entries = self.get_entries(['srcjunc', 'tgtdir']) |
| 5187 | self.assertEqual(entries['srcjunc'].is_junction(), True) |
| 5188 | self.assertEqual(entries['tgtdir'].is_junction(), False) |
| 5189 | |
| 5190 | def get_entry(self, name): |
| 5191 | path = self.bytes_path if isinstance(name, bytes) else self.path |
nothing calls this directly
no test coverage detected