Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 60a9593

Browse files
committed
Fix test_stat on BSD, /dev/da0 and /dev/ad0 are links
1 parent f678b31 commit 60a9593

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/test/test_stat.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ def test_devices(self):
152152
st_mode, modestr = self.get_mode(os.devnull)
153153
self.assertEqual(modestr[0], 'c')
154154
self.assertS_IS("CHR", st_mode)
155-
for blockdev in ("/dev/sda", "/dev/hda", "/dev/da0", "/dev/ad0"):
155+
# needs block devices in BSD, /dev/da0, /dev/ad0 are links
156+
for blockdev in ("/dev/sda", "/dev/hda"):
156157
if os.path.exists(blockdev):
157158
st_mode, modestr = self.get_mode(blockdev)
158159
self.assertEqual(modestr[0], 'b')

0 commit comments

Comments
 (0)