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

ASF GitHub Bot commented on CLIMATE-887:
----------------------------------------

GitHub user justinlulejian opened a pull request:

    https://github.com/apache/climate/pull/449

    CLIMATE-887 - test_local.py speed and style guide improvements

    - Change multiple tests (including test_get_netcdf_variable_names) to run 
setUp code once.
    - Use small static local file TestGetNetcdfVariableNames.nc as test data 
for test_get_netcdf_variable_names.
    - Clean up PEP8/257 warnings.

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

    $ git pull https://github.com/justinlulejian/climate master

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

    https://github.com/apache/climate/pull/449.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 #449
    
----
commit 56989f5788bc6ef9e8b2a68bad62d7ed98b1e629
Author: Justin L <justinlulej...@users.noreply.github.com>
Date:   2017-08-09T08:28:31Z

    CLIMATE-887 - test_local.py speed and style guide improvements
    
    - Change multiple tests (including test_get_netcdf_variable_names) to run 
setUp code once.
    - Use small static local file TestGetNetcdfVariableNames.nc as test data 
for test_get_netcdf_variable_names.
    - Clean up PEP8/257 warnings.

----


> test_get_netcdf_variable_names setUp to run only once for the test case
> -----------------------------------------------------------------------
>
>                 Key: CLIMATE-887
>                 URL: https://issues.apache.org/jira/browse/CLIMATE-887
>             Project: Apache Open Climate Workbench
>          Issue Type: Improvement
>          Components: tests
>    Affects Versions: 1.1.0
>            Reporter: Lewis John McGibbney
>             Fix For: 1.3.0
>
>
> Right now the particular test {code}test_get_netcdf_variable_names{code} 
> takes forever and a day due to the use of urlretrieve within the class setUp 
> function. This retrieves the same netCDF file from zipper.jpl.nasa.gov on 
> every test within the test_get_netcdf_variable_names function which is a 
> waste of time and resources. If anything, I would be +1 for having a small 
> netCDF file contained within the OCW test directory. This would speed up the 
> tests much more. 
> https://github.com/apache/climate/blob/master/ocw/tests/test_local.py#L236-L274



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to