Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/test_tricands.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ class TestTricands:
"""Test suite for tricands module."""

def setup_method(self):
# Close figures leaked by earlier tests on the same xdist worker:
# test_visualization_2d mocks plt.figure, so tricands draws into
# whatever Axes gca() finds — a leaked 3D Axes makes scatter fail
# with "s must be a scalar, or float array-like ...".
import matplotlib.pyplot as plt

plt.close("all")
# Create invalid (too few points) X
self.X_small = np.array([[0.1, 0.1]])
# Create valid 2D X
Expand Down