diff options
author | Matt Chisholm <matt@theory.org> | 2014-04-14 13:27:59 -0400 |
---|---|---|
committer | Matt Chisholm <matt@theory.org> | 2014-04-14 13:27:59 -0400 |
commit | 3cefa27709695318a36279567dee6db67746e414 (patch) | |
tree | 98983aba3ffcc5ceda0129cfdf25b582b8e034dd | |
parent | 73095b3531244250ee5af70ced6eecc16d4add3b (diff) | |
download | sqlalchemy-3cefa27709695318a36279567dee6db67746e414.tar.gz |
fix unclosed file ResourceWarning
part of #2830
-rw-r--r-- | test/sql/test_types.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/sql/test_types.py b/test/sql/test_types.py index 91e467aed..e887e2a7e 100644 --- a/test/sql/test_types.py +++ b/test/sql/test_types.py @@ -1218,7 +1218,8 @@ class BinaryTest(fixtures.TestBase, AssertsExecutionResults): def load_stream(self, name): f = os.path.join(os.path.dirname(__file__), "..", name) - return open(f, mode='rb').read() + with open(f, mode='rb') as o: + return o.read() class ExpressionTest(fixtures.TestBase, AssertsExecutionResults, AssertsCompiledSQL): __dialect__ = 'default' |