Skip to content

Commit

Permalink
Fix failing unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GuiMacielPereira committed Jan 7, 2025
1 parent 1786425 commit 1da5ec4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/unit/analysis/test_analysis_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def test_fit_neutron_compton_profiles_number_of_calls(self):
alg._dataY = np.array([[1, 1], [2, 2], [3, 3]])
alg._fit_parameters = np.ones(3) # To avoid assertion error
alg._fit_neutron_compton_profiles_to_row = MagicMock(return_value=None)
alg._table_fit_results = MagicMock(return_value=None)
alg._fit_neutron_compton_profiles()
self.assertEqual(alg._fit_neutron_compton_profiles_to_row.call_count, 3)

Expand Down Expand Up @@ -366,10 +367,10 @@ def test_set_means_and_std(self):

def pick_column(arg):
table = {
'1.0 width': [5.6, 5.1, 0, 2, 5.4],
'12.0 width': [2.1, 1, 0, 2.3, 1.9],
'1.0 intensity': [7.8, 7.6, 0, 5, 7.3],
'12.0 intensity': [3.1, 2, 0, 3.2, 3.1],
'1.0 w': [5.6, 5.1, 0, 2, 5.4],
'12.0 w': [2.1, 1, 0, 2.3, 1.9],
'1.0 i': [7.8, 7.6, 0, 5, 7.3],
'12.0 i': [3.1, 2, 0, 3.2, 3.1],
}
return table[arg]

Expand Down

0 comments on commit 1da5ec4

Please sign in to comment.