Defer a few more matplotlib imports

This commit is contained in:
Paul Romano 2023-04-26 09:48:05 -05:00
parent 664ae00cdc
commit f2549c9470
4 changed files with 11 additions and 11 deletions

View file

@ -1,7 +1,6 @@
import numpy as np
import openmc
import pytest
from matplotlib.figure import Figure
@pytest.fixture(scope='module')
@ -74,8 +73,10 @@ def test_calculate_cexs_with_materials(test_mat):
@pytest.mark.parametrize("this", ["Be", "Be9"])
def test_plot_xs(this):
assert isinstance(openmc.plotter.plot_xs(this, types=['total']), Figure)
from matplotlib.figure import Figure
assert isinstance(openmc.plot_xs(this, types=['total']), Figure)
def test_plot_xs_mat(test_mat):
assert isinstance(openmc.plotter.plot_xs(test_mat, types=['total']), Figure)
from matplotlib.figure import Figure
assert isinstance(openmc.plot_xs(test_mat, types=['total']), Figure)