This is an automated email from the ASF dual-hosted git repository.
nkollar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/master by this push:
new a604880 AVRO-2445: Remove context manager avoidance (#568)
a604880 is described below
commit a604880b5245812d002932031b404b897d2c963a
Author: Michael A. Smith <[email protected]>
AuthorDate: Fri Jun 28 04:07:42 2019 -0400
AVRO-2445: Remove context manager avoidance (#568)
---
lang/py/test/test_datafile.py | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/lang/py/test/test_datafile.py b/lang/py/test/test_datafile.py
index 8a81527..102d9b0 100644
--- a/lang/py/test/test_datafile.py
+++ b/lang/py/test/test_datafile.py
@@ -154,13 +154,7 @@ class TestDataFile(unittest.TestCase):
self.assertEquals(correct,
len(CODECS_TO_VALIDATE)*len(SCHEMAS_TO_VALIDATE))
def test_context_manager(self):
- # Context manager was introduced as a first class
- # member only in Python 2.6 and above.
- import sys
- if sys.version_info < (2,6):
- print 'Skipping context manager tests on this Python version.'
- return
- # Test the writer with a 'with' statement.
+ """Test the writer with a 'with' statement."""
writer = open(FILENAME, 'wb')
datum_writer = io.DatumWriter()
sample_schema, sample_datum = SCHEMAS_TO_VALIDATE[1]