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

Method test_info_is_symlink

Lib/test/test_pathlib/test_read.py:311–324  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

309 self.assertFalse((p / 'fileA\x00').info.is_file(follow_symlinks=False))
310
311 def test_info_is_symlink(self):
312 p = self.root
313 self.assertFalse((p / 'fileA').info.is_symlink())
314 self.assertFalse((p / 'dirA').info.is_symlink())
315 self.assertFalse((p / 'non-existing').info.is_symlink())
316 if self.ground.can_symlink:
317 self.assertTrue((p / 'linkA').info.is_symlink())
318 self.assertTrue((p / 'linkB').info.is_symlink())
319 self.assertTrue((p / 'brokenLink').info.is_symlink())
320 self.assertFalse((p / 'linkA\udfff').info.is_symlink())
321 self.assertFalse((p / 'linkA\x00').info.is_symlink())
322 self.assertTrue((p / 'brokenLinkLoop').info.is_symlink())
323 self.assertFalse((p / 'fileA\udfff').info.is_symlink())
324 self.assertFalse((p / 'fileA\x00').info.is_symlink())
325
326
327class ZipPathReadTest(ReadTestBase, unittest.TestCase):

Callers

nothing calls this directly

Calls 3

assertFalseMethod · 0.80
assertTrueMethod · 0.80
is_symlinkMethod · 0.45

Tested by

no test coverage detected