Skip to content

Commit

Permalink
fix: 1756 assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
terryyz committed May 11, 2024
1 parent 92981e7 commit 430e1c2
Show file tree
Hide file tree
Showing 5 changed files with 1,086 additions and 1,082 deletions.
5 changes: 3 additions & 2 deletions data/clean/f_1756_hanhu.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ def test_plot_data(self, mock_plot, mock_linspace):
# Execute the function under test
with patch('matplotlib.pyplot.show'):
f_1757()

# Assert the plot was called correctly, allow additional arguments like labels
mock_plot.assert_called_with(expected_X, expected_Y, label=ANY)
args, kwargs = mock_plot.call_args
self.assertTrue(np.allclose(args[0], expected_X))
self.assertTrue(np.allclose(args[1], expected_Y))

def test_grid_enabled(self):
"""Test if the grid is enabled in the plot."""
Expand Down
4 changes: 3 additions & 1 deletion data/processed/119_w_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ def test_plot_data(self, mock_plot, mock_linspace):
with patch('matplotlib.pyplot.show'):
task_func()
# Assert the plot was called correctly, allow additional arguments like labels
mock_plot.assert_called_with(expected_X, expected_Y, label=ANY)
args, kwargs = mock_plot.call_args
self.assertTrue(np.allclose(args[0], expected_X))
self.assertTrue(np.allclose(args[1], expected_Y))
def test_grid_enabled(self):
"""Test if the grid is enabled in the plot."""
with patch('matplotlib.pyplot.show'):
Expand Down
5 changes: 3 additions & 2 deletions data/raw/f_1756_hanhu.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ def test_plot_data(self, mock_plot, mock_linspace):
# Execute the function under test
with patch('matplotlib.pyplot.show'):
f_1757()

# Assert the plot was called correctly, allow additional arguments like labels
mock_plot.assert_called_with(expected_X, expected_Y, label=ANY)
args, kwargs = mock_plot.call_args
self.assertTrue(np.allclose(args[0], expected_X))
self.assertTrue(np.allclose(args[1], expected_Y))

def test_grid_enabled(self):
"""Test if the grid is enabled in the plot."""
Expand Down
Loading

0 comments on commit 430e1c2

Please sign in to comment.