Skip to content

Commit

Permalink
Pass file handle to ContainerIO
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Dec 27, 2024
1 parent f9767fb commit aef3aa2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Tests/test_file_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

from PIL import ContainerIO, Image

from .helper import hopper

TEST_FILE = "Tests/images/dummy.container"


Expand All @@ -15,15 +13,15 @@ def test_sanity() -> None:


def test_isatty() -> None:
with hopper() as im:
container = ContainerIO.ContainerIO(im, 0, 0)
with open(TEST_FILE, "rb") as fh:
container = ContainerIO.ContainerIO(fh, 0, 0)

assert container.isatty() is False


def test_seekable() -> None:
with hopper() as im:
container = ContainerIO.ContainerIO(im, 0, 0)
with open(TEST_FILE, "rb") as fh:
container = ContainerIO.ContainerIO(fh, 0, 0)

assert container.seekable() is True

Expand Down

0 comments on commit aef3aa2

Please sign in to comment.