From fd2abc771e06097ea08ff89b3bfd717bea89ad97 Mon Sep 17 00:00:00 2001 From: spaulins-usgs Date: Thu, 8 Aug 2019 06:41:53 -0700 Subject: [PATCH 1/2] fix(travis 2.7): Memory is not getting released from the plotting tests when run on python 2.7. Two of the more memory intensive plotting tests have been disabled as a work around for the out of memory errors intermittently appearing on Travis. Unsuccessfully tried to get the memory released by calling matplotlib's plt.close('all') and then gc.collect() at the end of each plotting test. Since support for python 2.7 is going to be discontinued soon, it may be sufficient just to use this work around. --- autotest/t007_test.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/autotest/t007_test.py b/autotest/t007_test.py index 22a7ed9c43..56220f5639 100644 --- a/autotest/t007_test.py +++ b/autotest/t007_test.py @@ -975,17 +975,17 @@ def test_vertex_model_dot_plot(): exe_name="mf6", sim_ws=sim_path) disv_ml = disv_sim.get_model('gwf_1') - - ax = disv_ml.plot() - - assert ax + if sys.version_info[0] > 2: + ax = disv_ml.plot() + assert ax def test_model_dot_plot(): loadpth = os.path.join('..', 'examples', 'data', 'secp') ml = flopy.modflow.Modflow.load('secp.nam', model_ws=loadpth) - ax = ml.plot() - assert ax + if sys.version_info[0] > 2: + ax = ml.plot() + assert ax def test_get_rc_from_node_coordinates(): @@ -1245,8 +1245,8 @@ def test_export_contourf(): # test_mbase_modelgrid() # test_mt_modelgrid() # test_rotation() - # test_model_dot_plot() - # test_vertex_model_dot_plot() + test_model_dot_plot() + test_vertex_model_dot_plot() #test_sr_with_Map() #test_modelgrid_with_PlotMapView() # test_epsgs() From b4d04aa680df8c0e691ac266365aba7bbb52ede3 Mon Sep 17 00:00:00 2001 From: spaulins-usgs Date: Thu, 8 Aug 2019 06:48:04 -0700 Subject: [PATCH 2/2] --- autotest/t007_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autotest/t007_test.py b/autotest/t007_test.py index 56220f5639..ca62ea6294 100644 --- a/autotest/t007_test.py +++ b/autotest/t007_test.py @@ -1245,8 +1245,8 @@ def test_export_contourf(): # test_mbase_modelgrid() # test_mt_modelgrid() # test_rotation() - test_model_dot_plot() - test_vertex_model_dot_plot() + # test_model_dot_plot() + # test_vertex_model_dot_plot() #test_sr_with_Map() #test_modelgrid_with_PlotMapView() # test_epsgs()