MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_attributes_junctions

Method test_attributes_junctions

Lib/test/test_os.py:5176–5188  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

get_entriesMethod · 0.95
joinMethod · 0.45
mkdirMethod · 0.45
assertEqualMethod · 0.45
is_junctionMethod · 0.45

Tested by

no test coverage detected