7
7
import sys
8
8
import numpy as np
9
9
import matplotlib .image as mpimg
10
+ import matplotlib .pyplot as plt
10
11
from ogcore import utils , output_plots , constants
11
12
12
13
@@ -166,6 +167,7 @@ def test_plot_aggregates(
166
167
plot_title = plot_title ,
167
168
)
168
169
assert fig
170
+ plt .close ()
169
171
170
172
171
173
test_data = [
@@ -217,6 +219,7 @@ def test_plot_industry_aggregates(
217
219
plot_title = plot_title ,
218
220
)
219
221
assert fig
222
+ plt .close ()
220
223
221
224
222
225
test_data = [
@@ -300,6 +303,7 @@ def test_plot_gdp_ratio(
300
303
plot_title = plot_title ,
301
304
)
302
305
assert fig
306
+ plt .close ()
303
307
304
308
305
309
def test_plot_gdp_ratio_save_fig (tmpdir ):
@@ -327,6 +331,7 @@ def test_ability_bar():
327
331
plot_title = " Test Plot Title" ,
328
332
)
329
333
assert fig
334
+ plt .close ()
330
335
331
336
332
337
def test_ability_bar_save_fig (tmpdir ):
@@ -353,6 +358,7 @@ def test_ability_bar_ss():
353
358
plot_title = " Test Plot Title" ,
354
359
)
355
360
assert fig
361
+ plt .close ()
356
362
357
363
358
364
data_for_plot = np .ones (80 ) * 0.3
@@ -374,6 +380,7 @@ def test_ss_profiles(by_j, plot_data):
374
380
plot_title = " Test Plot Title" ,
375
381
)
376
382
assert fig
383
+ plt .close ()
377
384
378
385
379
386
def test_ss_profiles_save_fig (tmpdir ):
@@ -398,6 +405,7 @@ def test_tpi_profiles(by_j):
398
405
plot_title = " Test Plot Title" ,
399
406
)
400
407
assert fig
408
+ plt .close ()
401
409
402
410
403
411
test_data = [
@@ -454,6 +462,7 @@ def test_ss_3Dplot(
454
462
plot_title = plot_title ,
455
463
)
456
464
assert fig
465
+ plt .close ()
457
466
458
467
459
468
def test_ss_3Dplot_save_fig (tmpdir ):
@@ -540,6 +549,7 @@ def test_inequality_plot(
540
549
plot_type = plot_type ,
541
550
)
542
551
assert fig
552
+ plt .close ()
543
553
544
554
545
555
def test_inequality_plot_save_fig (tmpdir ):
0 commit comments