Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion sdks/python/apache_beam/dataframe/convert_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ def test_convert_memoization_clears_cache(self):
# cache size
gc.disable()

# Also disable logging, as some implementations may artificially extend
# the life of objects.
import logging
logging.disable(logging.INFO)

try:
self.test_convert_memoization()
self.assertEqual(len(convert.TO_PCOLLECTION_CACHE), 3)
Expand All @@ -175,8 +180,9 @@ def test_convert_memoization_clears_cache(self):
# scope and are GC'd
self.assertEqual(len(convert.TO_PCOLLECTION_CACHE), 0)
finally:
# Always re-enable GC
# Always re-enable GC and logging
gc.enable()
logging.disable(logging.NOTSET)


if __name__ == '__main__':
Expand Down