You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Michael A. Smith (Jira)" <ji...@apache.org> on 2019/10/26 22:16:00 UTC

[jira] [Updated] (AVRO-2603) Refactor test_tether_word_count.py

     [ https://issues.apache.org/jira/browse/AVRO-2603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael A. Smith updated AVRO-2603:
-----------------------------------
    Description: 
[https://github.com/apache/avro/blob/master/lang/py/test/test_tether_word_count.py] needs to be refactored:
 # It's contained almost entirely in a single function. Setup and teardown should be isolated from the test itself.
 # Most of the code takes place in a large try/finally block that can obscure legitimate test failures.
 # The test creates unnecessary files. Instead of creating a script to export {{PYTHONPATH}}, we can use [subprocess.Popen's env parameter|https://docs.python.org/2/library/subprocess.html#subprocess.Popen] to provide the environment we want.
 # The exit status of the subprocess itself is not checked, which can lead to missed test failures.

  was:
[https://github.com/apache/avro/blob/master/lang/py/test/test_tether_word_count.py] needs to be refactored:
 # It's contained almost entirely in a single function. Setup and teardown should be isolated from the test itself.
 # Most of the code takes place in a large try/finally block that can obscure legitimate test failures.
 # The test creates unnecessary files. Instead of creating a script to export {{PYTHONPATH}}, we can use {{}}[subprocess.Popen's env parameter|https://docs.python.org/2/library/subprocess.html#subprocess.Popen] to provide the environment we want.
 # The exit status of the subprocess itself is not checked, which can lead to missed test failures.


> Refactor test_tether_word_count.py
> ----------------------------------
>
>                 Key: AVRO-2603
>                 URL: https://issues.apache.org/jira/browse/AVRO-2603
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: python
>    Affects Versions: 1.9.1
>            Reporter: Michael A. Smith
>            Assignee: Michael A. Smith
>            Priority: Major
>             Fix For: 1.9.2
>
>
> [https://github.com/apache/avro/blob/master/lang/py/test/test_tether_word_count.py] needs to be refactored:
>  # It's contained almost entirely in a single function. Setup and teardown should be isolated from the test itself.
>  # Most of the code takes place in a large try/finally block that can obscure legitimate test failures.
>  # The test creates unnecessary files. Instead of creating a script to export {{PYTHONPATH}}, we can use [subprocess.Popen's env parameter|https://docs.python.org/2/library/subprocess.html#subprocess.Popen] to provide the environment we want.
>  # The exit status of the subprocess itself is not checked, which can lead to missed test failures.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)