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 370a7f1

Browse filesBrowse files
miss-islingtonaisk
andauthored
[3.11] gh-104242: Enable test_is_char_device_true in pathlib test on all platform (GH-116983) (GH-117277) (GH-117280)
(cherry picked from commit 17a82a1) (cherry picked from commit af1b0e9) Co-authored-by: AN Long <aisk@users.noreply.github.com>
1 parent d161061 commit 370a7f1
Copy full SHA for 370a7f1

File tree

Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed

‎Lib/test/test_pathlib.py

Copy file name to clipboardExpand all lines: Lib/test/test_pathlib.py
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2430,15 +2430,15 @@ def test_is_char_device_false(self):
24302430
self.assertIs((P / 'fileA\x00').is_char_device(), False)
24312431

24322432
def test_is_char_device_true(self):
2433-
# Under Unix, /dev/null should generally be a char device.
2434-
P = self.cls('/dev/null')
2433+
# os.devnull should generally be a char device.
2434+
P = self.cls(os.devnull)
24352435
if not P.exists():
2436-
self.skipTest("/dev/null required")
2436+
self.skipTest("null device required")
24372437
self.assertTrue(P.is_char_device())
24382438
self.assertFalse(P.is_block_device())
24392439
self.assertFalse(P.is_file())
2440-
self.assertIs(self.cls('/dev/null\udfff').is_char_device(), False)
2441-
self.assertIs(self.cls('/dev/null\x00').is_char_device(), False)
2440+
self.assertIs(self.cls(f'{os.devnull}\udfff').is_char_device(), False)
2441+
self.assertIs(self.cls(f'{os.devnull}\x00').is_char_device(), False)
24422442

24432443
def test_pickling_common(self):
24442444
p = self.cls(BASE, 'fileA')

0 commit comments

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