From 87d322cb57fbf3d9bdd537f9bb53c0f714dddee4 Mon Sep 17 00:00:00 2001 From: Tucker Downs Date: Fri, 20 Oct 2023 08:32:26 -0700 Subject: [PATCH] Address code quality --- colour/plotting/tests/test_common.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/colour/plotting/tests/test_common.py b/colour/plotting/tests/test_common.py index 904017534..bf287875a 100644 --- a/colour/plotting/tests/test_common.py +++ b/colour/plotting/tests/test_common.py @@ -173,19 +173,18 @@ def test_axes_args(self): Test `colour.plotting.common.artist` figure / axis association """ fig1 = plt.figure() - ax1 = fig1.gca() + fig_sub1 = fig1.subfigures() + fig_sub2 = fig_sub1.subfigures() + ax1 = fig_sub2.gca() - fig2, ax2 = artist(axes=ax1) + fig_result1, _ = artist(axes=ax1) - self.assertEqual(fig1, fig2) - plt.close(fig1) + self.assertIs(fig1, fig_result1) - fig1 = plt.figure() - ax1 = fig1.gca() - fig2 = plt.figure() + _ = plt.figure() - fig3, ax3 = artist(axes=ax1) - self.assertEqual(fig1, fig3) + fig_result2, _ = artist(axes=ax1) + self.assertIs(fig1, fig_result2) def test_artist(self): """Test :func:`colour.plotting.common.artist` definition."""