Fix "memory leak" in python tests (#652)

OOMs on RPi (1GB)
This commit is contained in:
Eugene Kliuchnikov 2018-03-23 02:09:00 +06:00 committed by GitHub
parent a238f5bac9
commit 2c03482569
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -17,6 +17,9 @@ class _TestCompressor(object):
CHUNK_SIZE = 2048
def tearDown(self):
self.compressor = None
def _check_decompression(self, test_data):
# Write decompression to temp file and verify it matches the original.
temp_uncompressed = _test_utils.get_temp_uncompressed_name(test_data)

View File

@ -21,6 +21,9 @@ class TestDecompressor(_test_utils.TestCase):
def setUp(self):
self.decompressor = brotli.Decompressor()
def tearDown(self):
self.decompressor = None
def _check_decompression(self, test_data):
# Verify decompression matches the original.
temp_uncompressed = _test_utils.get_temp_uncompressed_name(test_data)