Refs #23919 -- Replaced errno checking with PEP 3151 exceptions.

This commit is contained in:
Tim Graham 2017-01-25 10:13:08 -05:00 committed by GitHub
parent 3f0c4fe18f
commit 632c4ffd9c
12 changed files with 55 additions and 87 deletions

View file

@ -1360,7 +1360,7 @@ class FileBasedCacheTests(BaseCacheTests, TestCase):
# Returns the default instead of erroring.
self.assertEqual(cache.get('foo', 'baz'), 'baz')
def test_get_does_not_ignore_non_enoent_errno_values(self):
def test_get_does_not_ignore_non_filenotfound_exceptions(self):
with mock.patch('builtins.open', side_effect=IOError):
with self.assertRaises(IOError):
cache.get('foo')