Ensure that if tell gives an IOError super_len doesn't fail
(self, error)
| 84 | |
| 85 | @pytest.mark.parametrize("error", [IOError, OSError]) |
| 86 | def test_super_len_tell_ioerror(self, error): |
| 87 | """Ensure that if tell gives an IOError super_len doesn't fail""" |
| 88 | |
| 89 | class NoLenBoomFile: |
| 90 | def tell(self): |
| 91 | raise error() |
| 92 | |
| 93 | def seek(self, offset, whence): |
| 94 | pass |
| 95 | |
| 96 | assert super_len(NoLenBoomFile()) == 0 |
| 97 | |
| 98 | def test_string(self): |
| 99 | assert super_len("Test") == 4 |
nothing calls this directly
no test coverage detected