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

Method test_29248

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

Source from the content-addressed store, hash-verified

3192 and os.path.exists(r'C:\ProgramData'),
3193 'Test directories not found')
3194 def test_29248(self):
3195 # os.symlink() calls CreateSymbolicLink, which creates
3196 # the reparse data buffer with the print name stored
3197 # first, so the offset is always 0. CreateSymbolicLink
3198 # stores the "PrintName" DOS path (e.g. "C:\") first,
3199 # with an offset of 0, followed by the "SubstituteName"
3200 # NT path (e.g. "\??\C:\"). The "All Users" link, on
3201 # the other hand, seems to have been created manually
3202 # with an inverted order.
3203 target = os.readlink(r'C:\Users\All Users')
3204 self.assertTrue(os.path.samefile(target, r'C:\ProgramData'))
3205
3206 def test_buffer_overflow(self):
3207 # Older versions would have a buffer overflow when detecting

Callers

nothing calls this directly

Calls 3

assertTrueMethod · 0.80
samefileMethod · 0.80
readlinkMethod · 0.45

Tested by

no test coverage detected