Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.11] [3.12] gh-104242: Enable test_is_char_device_true in pathlib test on all platform (GH-116983) (GH-117277) #117280

Merged
merged 1 commit into from Mar 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions Lib/test/test_pathlib.py
Expand Up @@ -2430,15 +2430,15 @@ def test_is_char_device_false(self):
self.assertIs((P / 'fileA\x00').is_char_device(), False)

def test_is_char_device_true(self):
# Under Unix, /dev/null should generally be a char device.
P = self.cls('/dev/null')
# os.devnull should generally be a char device.
P = self.cls(os.devnull)
if not P.exists():
self.skipTest("/dev/null required")
self.skipTest("null device required")
self.assertTrue(P.is_char_device())
self.assertFalse(P.is_block_device())
self.assertFalse(P.is_file())
self.assertIs(self.cls('/dev/null\udfff').is_char_device(), False)
self.assertIs(self.cls('/dev/null\x00').is_char_device(), False)
self.assertIs(self.cls(f'{os.devnull}\udfff').is_char_device(), False)
self.assertIs(self.cls(f'{os.devnull}\x00').is_char_device(), False)

def test_pickling_common(self):
p = self.cls(BASE, 'fileA')
Expand Down