Skip to content

Commit 430e1c2

Browse files
committed
fix: 1756 assertion
1 parent 92981e7 commit 430e1c2

File tree

5 files changed

+1086
-1082
lines changed

5 files changed

+1086
-1082
lines changed

data/clean/f_1756_hanhu.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ def test_plot_data(self, mock_plot, mock_linspace):
7070
# Execute the function under test
7171
with patch('matplotlib.pyplot.show'):
7272
f_1757()
73-
7473
# Assert the plot was called correctly, allow additional arguments like labels
75-
mock_plot.assert_called_with(expected_X, expected_Y, label=ANY)
74+
args, kwargs = mock_plot.call_args
75+
self.assertTrue(np.allclose(args[0], expected_X))
76+
self.assertTrue(np.allclose(args[1], expected_Y))
7677

7778
def test_grid_enabled(self):
7879
"""Test if the grid is enabled in the plot."""

data/processed/119_w_doc.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ def test_plot_data(self, mock_plot, mock_linspace):
6666
with patch('matplotlib.pyplot.show'):
6767
task_func()
6868
# Assert the plot was called correctly, allow additional arguments like labels
69-
mock_plot.assert_called_with(expected_X, expected_Y, label=ANY)
69+
args, kwargs = mock_plot.call_args
70+
self.assertTrue(np.allclose(args[0], expected_X))
71+
self.assertTrue(np.allclose(args[1], expected_Y))
7072
def test_grid_enabled(self):
7173
"""Test if the grid is enabled in the plot."""
7274
with patch('matplotlib.pyplot.show'):

data/raw/f_1756_hanhu.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ def test_plot_data(self, mock_plot, mock_linspace):
7070
# Execute the function under test
7171
with patch('matplotlib.pyplot.show'):
7272
f_1757()
73-
7473
# Assert the plot was called correctly, allow additional arguments like labels
75-
mock_plot.assert_called_with(expected_X, expected_Y, label=ANY)
74+
args, kwargs = mock_plot.call_args
75+
self.assertTrue(np.allclose(args[0], expected_X))
76+
self.assertTrue(np.allclose(args[1], expected_Y))
7677

7778
def test_grid_enabled(self):
7879
"""Test if the grid is enabled in the plot."""

0 commit comments

Comments
 (0)