You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/06/02 09:18:59 UTC

[jira] [Commented] (FLINK-4002) [py] Improve testing infraestructure

    [ https://issues.apache.org/jira/browse/FLINK-4002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15312006#comment-15312006 ] 

ASF GitHub Bot commented on FLINK-4002:
---------------------------------------

GitHub user omaralvarez opened a pull request:

    https://github.com/apache/flink/pull/2063

    [FLINK-4002] [py] Improve testing infraestructure

    The Verify() test function now does not error out when array elements are missing:
    
    ```python
    env.generate_sequence(1, 5)\
             .map(Id()).map_partition(Verify([1,2,3,4], "Sequence")).output()
    ```
    
    I have also documented test functions.
    
    While documenting, two questions arise. First, Verify2 function has no use as is, performing a `if value in self.expected:` before:
    
    ```python
    try:
        self.expected.remove(value)
    except Exception:
        raise Exception()
    ```
    
    Makes this function useless, since it will never raise and exception, if I am not mistaken. 
    
    Also, I am not sure why there are two test scripts, `main_test.py` and `main_test2.py`. 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/omaralvarez/flink py_testing

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/2063.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2063
    
----
commit 784a602167f396cdcd1201509d3c122a5a85248f
Author: omaralvarez <om...@udc.es>
Date:   2016-06-02T09:09:08Z

    [FLINK-4002] [py] Improve testing infraestructure

----


> [py] Improve testing infraestructure
> ------------------------------------
>
>                 Key: FLINK-4002
>                 URL: https://issues.apache.org/jira/browse/FLINK-4002
>             Project: Flink
>          Issue Type: Bug
>          Components: Python API
>    Affects Versions: 1.0.3
>            Reporter: Omar Alvarez
>            Priority: Minor
>              Labels: Python, Testing
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> The Verify() test function errors out when array elements are missing:
> {code}
> env.generate_sequence(1, 5)\
>          .map(Id()).map_partition(Verify([1,2,3,4], "Sequence")).output()
> {code}
> {quote}
> IndexError: list index out of range
> {quote}
> There should also be more documentation in test functions.
> I am already working on a pull request to fix this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)