diff --git a/_unittest/test_12_PostProcessing.py b/_unittest/test_12_PostProcessing.py index 5f6e828181b..02080a3f663 100644 --- a/_unittest/test_12_PostProcessing.py +++ b/_unittest/test_12_PostProcessing.py @@ -637,6 +637,7 @@ def test_71_antenna_plot(self, field_test): title="Contour at {}Hz".format(ffdata.frequency), image_path=os.path.join(self.local_scratch.path, "contour.jpg"), convert_to_db=True, + show=False, ) assert os.path.exists(os.path.join(self.local_scratch.path, "contour.jpg")) @@ -659,7 +660,10 @@ def test_71_antenna_plot(self, field_test): assert os.path.exists(os.path.join(self.local_scratch.path, "2d2.jpg")) ffdata.polar_plot_3d( - quantity="RealizedGain", image_path=os.path.join(self.local_scratch.path, "3d1.jpg"), convert_to_db=True + quantity="RealizedGain", + image_path=os.path.join(self.local_scratch.path, "3d1.jpg"), + convert_to_db=True, + show=False, ) assert os.path.exists(os.path.join(self.local_scratch.path, "3d1.jpg")) @@ -686,6 +690,7 @@ def test_72_antenna_plot(self, array_test): title="Contour at {}Hz".format(ffdata.frequency), image_path=os.path.join(self.local_scratch.path, "contour.jpg"), convert_to_db=True, + show=False, ) assert os.path.exists(os.path.join(self.local_scratch.path, "contour.jpg")) @@ -725,6 +730,7 @@ def test_72_antenna_plot(self, array_test): title="Contour at {}Hz".format(ffdata1.frequency), image_path=os.path.join(self.local_scratch.path, "contour1.jpg"), convert_to_db=True, + show=False, ) assert os.path.exists(os.path.join(self.local_scratch.path, "contour1.jpg")) diff --git a/pyaedt/modules/solutions.py b/pyaedt/modules/solutions.py index 09b0e81c8e4..bd800acdcef 100644 --- a/pyaedt/modules/solutions.py +++ b/pyaedt/modules/solutions.py @@ -1655,7 +1655,7 @@ def plot_farfield_contour( if image_path: plt.savefig(image_path) - if show: + if show: # pragma: no cover plt.show() plt.rcParams["figure.figsize"] = default_figsize @@ -1910,7 +1910,7 @@ def polar_plot_3d( x = r * np.sin(theta_grid) * np.cos(phi_grid) y = r * np.sin(theta_grid) * np.sin(phi_grid) z = r * np.cos(theta_grid) - if show: + if show: # pragma: no cover plot_3d_chart([x, y, z], xlabel="Theta", ylabel="Phi", title=title, snapshot_path=image_path) else: return x, y, z