Clean up code which checked presence of os.{stat,lstat,chmod} (#11643)

This commit is contained in:
Anthony Sottile 2019-02-25 14:32:27 -08:00 committed by Giampaolo Rodola
parent 9c3f284de5
commit 8377cd4fcd
18 changed files with 21 additions and 70 deletions

View file

@ -428,7 +428,6 @@ class FileInputTests(BaseTests, unittest.TestCase):
self.assertTrue(os_fstat_replacement.invoked,
"os.fstat() was not invoked")
@unittest.skipIf(not hasattr(os, "chmod"), "os.chmod does not exist")
def test_readline_os_chmod_raises_OSError(self):
"""Tests invoking FileInput.readline() when os.chmod() raises OSError.
This exception should be silently discarded."""