diff options
author | Eugene Kliuchnikov <eustas@google.com> | 2018-03-23 02:09:00 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-23 02:09:00 +0600 |
commit | 2c0348256935aa8aad46bd46dceca3cc93f5a388 (patch) | |
tree | 633c195411a2986bf1b6d17bc1d1904972bf1f55 | |
parent | a238f5bac9c1391b8eda0788be37170084b088be (diff) | |
download | brotli-2c0348256935aa8aad46bd46dceca3cc93f5a388.zip brotli-2c0348256935aa8aad46bd46dceca3cc93f5a388.tar.gz brotli-2c0348256935aa8aad46bd46dceca3cc93f5a388.tar.bz2 |
Fix "memory leak" in python tests (#652)
OOMs on RPi (1GB)
-rw-r--r-- | python/tests/compressor_test.py | 3 | ||||
-rw-r--r-- | python/tests/decompressor_test.py | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/python/tests/compressor_test.py b/python/tests/compressor_test.py index 22e3bc5..2d47919 100644 --- a/python/tests/compressor_test.py +++ b/python/tests/compressor_test.py @@ -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) diff --git a/python/tests/decompressor_test.py b/python/tests/decompressor_test.py index afa127f..99667bc 100644 --- a/python/tests/decompressor_test.py +++ b/python/tests/decompressor_test.py @@ -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) |