Skip to content

Commit 76ad8aa

Browse files
Add versionadded and comments.
1 parent 2ba5b75 commit 76ad8aa

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Doc/library/os.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2634,6 +2634,8 @@ features:
26342634

26352635
Non-existent device.
26362636

2637+
.. versionadded:: next
2638+
26372639

26382640
.. function:: pathconf(path, name)
26392641

Lib/test/test_posix.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,12 @@ def test_makedev(self):
757757
self.assertRaises((ValueError, OverflowError), posix.makedev, x, minor)
758758
self.assertRaises((ValueError, OverflowError), posix.makedev, major, x)
759759

760+
# The following tests are needed to test functions accepting or
761+
# returning the special value NODEV (if it is defined). major(), minor()
762+
# and makefile() are the only easily reproducible examples, but that
763+
# behavior is platform specific -- on some platforms their code has
764+
# a special case for NODEV, on others this is just an implementation
765+
# artifact.
760766
if (hasattr(posix, 'NODEV') and
761767
sys.platform.startswith(('linux', 'macos', 'freebsd', 'dragonfly',
762768
'sunos'))):
@@ -766,6 +772,7 @@ def test_makedev(self):
766772
self.assertEqual(posix.makedev(NODEV, NODEV), NODEV)
767773

768774
def test_nodev(self):
775+
# NODEV is not a part of Posix, but is defined on many systems.
769776
if (not hasattr(posix, 'NODEV')
770777
and (not sys.platform.startswith(('linux', 'macos', 'freebsd',
771778
'dragonfly', 'netbsd', 'openbsd',

0 commit comments

Comments
 (0)