We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a539b5 commit 5fce813Copy full SHA for 5fce813
Lib/test/test_os.py
@@ -2683,12 +2683,17 @@ def test_listvolumes(self):
2683
2684
def test_listmounts(self):
2685
for volume in os.listvolumes():
2686
- mounts = os.listmounts(volume)
2687
- self.assertIsInstance(mounts, list)
2688
- self.assertSetEqual(
2689
- set(mounts),
2690
- self.known_mounts & set(mounts),
2691
- )
+ try:
+ mounts = os.listmounts(volume)
+ except OSError as ex:
+ if support.verbose:
+ print("Skipping", volume, "because of", ex)
+ else:
2692
+ self.assertIsInstance(mounts, list)
2693
+ self.assertSetEqual(
2694
+ set(mounts),
2695
+ self.known_mounts & set(mounts),
2696
+ )
2697
2698
2699
@unittest.skipUnless(hasattr(os, 'readlink'), 'needs os.readlink()')
0 commit comments