Skip to content

Commit

Permalink
Address code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
tjdcs authored and KelSolaar committed Oct 20, 2023
1 parent a4df0eb commit 87d322c
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions colour/plotting/tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down

0 comments on commit 87d322c

Please sign in to comment.