mirror of
https://github.com/python/cpython.git
synced 2025-11-20 02:50:14 +00:00
GH-89812: Test that pathlib.Path.is_junction() returns false (GH-106062)
Slightly expand the test coverage of `is_junction()`. The existing test only checks that `os.path.isjunction()` is called under-the-hood.
This commit is contained in:
parent
3fd99b5a97
commit
6e01055e15
1 changed files with 9 additions and 0 deletions
|
|
@ -2271,6 +2271,15 @@ class PathTest(unittest.TestCase):
|
|||
self.assertIs((P / 'linkA\udfff').is_file(), False)
|
||||
self.assertIs((P / 'linkA\x00').is_file(), False)
|
||||
|
||||
def test_is_junction_false(self):
|
||||
P = self.cls(BASE)
|
||||
self.assertFalse((P / 'fileA').is_junction())
|
||||
self.assertFalse((P / 'dirA').is_junction())
|
||||
self.assertFalse((P / 'non-existing').is_junction())
|
||||
self.assertFalse((P / 'fileA' / 'bah').is_junction())
|
||||
self.assertFalse((P / 'fileA\udfff').is_junction())
|
||||
self.assertFalse((P / 'fileA\x00').is_junction())
|
||||
|
||||
def test_is_fifo_false(self):
|
||||
P = self.cls(BASE)
|
||||
self.assertFalse((P / 'fileA').is_fifo())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue