Kaydet (Commit) 60a95933 authored tarafından Christian Heimes's avatar Christian Heimes

Fix test_stat on BSD, /dev/da0 and /dev/ad0 are links

üst f678b313
...@@ -152,7 +152,8 @@ class TestFilemode(unittest.TestCase): ...@@ -152,7 +152,8 @@ class TestFilemode(unittest.TestCase):
st_mode, modestr = self.get_mode(os.devnull) st_mode, modestr = self.get_mode(os.devnull)
self.assertEqual(modestr[0], 'c') self.assertEqual(modestr[0], 'c')
self.assertS_IS("CHR", st_mode) self.assertS_IS("CHR", st_mode)
for blockdev in ("/dev/sda", "/dev/hda", "/dev/da0", "/dev/ad0"): # needs block devices in BSD, /dev/da0, /dev/ad0 are links
for blockdev in ("/dev/sda", "/dev/hda"):
if os.path.exists(blockdev): if os.path.exists(blockdev):
st_mode, modestr = self.get_mode(blockdev) st_mode, modestr = self.get_mode(blockdev)
self.assertEqual(modestr[0], 'b') self.assertEqual(modestr[0], 'b')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment