Skip to content

Commit

Permalink
Fix a ResourceWarning under Python 3 tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadden committed Nov 12, 2017
1 parent 33d6f5f commit 394fce9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/zope/publisher/tests/test_http.py
Expand Up @@ -74,7 +74,8 @@ def getLogMessage(self):

# tempfiles have different types on different platforms, therefore use
# this "canonical" way of finding out the type.
TempFileType = tempfile.TemporaryFile().__class__
with tempfile.TemporaryFile() as t:
TempFileType = t.__class__

class HTTPInputStreamTests(unittest.TestCase):

Expand Down

0 comments on commit 394fce9

Please sign in to comment.