typing: tests: tmpfile

This commit is contained in:
Daniel Hahler 2020-01-25 19:21:19 +01:00
parent 3f8f395210
commit d678d380cb
1 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@ import textwrap
from io import StringIO
from io import UnsupportedOperation
from typing import BinaryIO
from typing import Generator
from typing import List
from typing import TextIO
@ -832,7 +833,7 @@ def test_dontreadfrominput():
@pytest.fixture
def tmpfile(testdir):
def tmpfile(testdir) -> Generator[BinaryIO, None, None]:
f = testdir.makepyfile("").open("wb+")
yield f
if not f.closed: