Make ContainerIO.isatty() return a bool, not int

Better follows the interface of IOBase.isatty:

https://docs.python.org/3/library/io.html#io.IOBase.isatty
This commit is contained in:
Jon Dufresne 2019-01-10 18:19:21 -08:00
parent 7bf5246b93
commit a08bfa6e9f
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ class TestFileContainer(PillowTestCase):
im = hopper()
container = ContainerIO.ContainerIO(im, 0, 0)
self.assertEqual(container.isatty(), 0)
self.assertFalse(container.isatty())
def test_seek_mode_0(self):
# Arrange

View File

@ -39,7 +39,7 @@ class ContainerIO(object):
# Always false.
def isatty(self):
return 0
return False
def seek(self, offset, mode=0):
"""