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

This commit is contained in:
Christian Heimes 2013-06-21 18:53:13 +02:00
parent f678b3131e
commit 60a95933cb
1 changed files with 2 additions and 1 deletions

View File

@ -152,7 +152,8 @@ class TestFilemode(unittest.TestCase):
st_mode, modestr = self.get_mode(os.devnull)
self.assertEqual(modestr[0], 'c')
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):
st_mode, modestr = self.get_mode(blockdev)
self.assertEqual(modestr[0], 'b')