Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6e01055

Browse filesBrowse files
authored
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.
1 parent 3fd99b5 commit 6e01055
Copy full SHA for 6e01055

File tree

Expand file treeCollapse file tree

1 file changed

+9
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-0
lines changed

‎Lib/test/test_pathlib.py

Copy file name to clipboardExpand all lines: Lib/test/test_pathlib.py
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2271,6 +2271,15 @@ def test_is_symlink(self):
22712271
self.assertIs((P / 'linkA\udfff').is_file(), False)
22722272
self.assertIs((P / 'linkA\x00').is_file(), False)
22732273

2274+
def test_is_junction_false(self):
2275+
P = self.cls(BASE)
2276+
self.assertFalse((P / 'fileA').is_junction())
2277+
self.assertFalse((P / 'dirA').is_junction())
2278+
self.assertFalse((P / 'non-existing').is_junction())
2279+
self.assertFalse((P / 'fileA' / 'bah').is_junction())
2280+
self.assertFalse((P / 'fileA\udfff').is_junction())
2281+
self.assertFalse((P / 'fileA\x00').is_junction())
2282+
22742283
def test_is_fifo_false(self):
22752284
P = self.cls(BASE)
22762285
self.assertFalse((P / 'fileA').is_fifo())

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.