This is an automated email from the ASF dual-hosted git repository. rskraba pushed a commit to branch branch-1.9 in repository https://gitbox.apache.org/repos/asf/avro.git
commit 138f55f15a6ccbfcab6bcad9b9e6485bb372cf88 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]
