Skip to content

Commit

Permalink
more rebase fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Meisrimel authored and Peter Meisrimel committed Oct 30, 2024
1 parent 65404d0 commit dc56119
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
3 changes: 1 addition & 2 deletions tests/test_fmi_master.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,10 @@ def test_basic_simulation_memory(self):
opts = {"result_handling":"memory"}
self._basic_simulation(opts)

@testattr(stddist = True)
def test_basic_simulation_max_result_size(self):
opts = {"result_max_size":10000}

with nose.tools.assert_raises(ResultSizeError):
with pytest.raises(ResultSizeError):
self._basic_simulation(opts)

def test_basic_simulation_mat_file_naming(self):
Expand Down
13 changes: 5 additions & 8 deletions tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -1681,9 +1681,8 @@ def _test_get_variables_data(self, dynamic_diagnostics: bool, nbr_of_calls: int,
assert data_to_return, "Something went wrong, no test data was generated"
return data_to_return

@testattr(stddist = True)
def test_get_variables_data_values0(self):
""" Verifing values from get_variables_data. """
""" Verifying values from get_variables_data. """
vars_to_test = ['J4.phi']
test_data_sets = self._test_get_variables_data(False, 3, None, vars_to_test, lambda x: None, "TestFile00.mat")

Expand All @@ -1696,9 +1695,8 @@ def test_get_variables_data_values0(self):
for index, test_data in test_data_sets.items():
np.testing.assert_array_almost_equal(test_data[0], reference_data[index])

@testattr(stddist = True)
def test_get_variables_data_values1(self):
""" Verifing values from get_variables_data, with dynamic_diagnostics = True. """
""" Verifying values from get_variables_data, with dynamic_diagnostics = True. """
vars_to_test = ['time', 'J4.phi', '@Diagnostics.step_time', '@Diagnostics.nbr_steps']
test_data_sets = self._test_get_variables_data(True, 5, 3, vars_to_test, lambda x: None, "TestFile01.mat")

Expand All @@ -1715,9 +1713,8 @@ def test_get_variables_data_values1(self):
for index, test_data in test_data_sets.items():
np.testing.assert_array_almost_equal(test_data[1], reference_data[index])

@testattr(stddist = True)
def test_get_variables_data_values2(self):
""" Verifing values from get_variables_data, retrieving partial trajectories. """
""" Verifying values from get_variables_data, retrieving partial trajectories. """
vars_to_test = ['time', 'J4.phi']
test_data_sets = self._test_get_variables_data(False, 5, None, vars_to_test, lambda x: x + 1, "TestFile02.mat")

Expand All @@ -1733,7 +1730,7 @@ def test_get_variables_data_values2(self):
np.testing.assert_array_almost_equal(test_data[1], reference_data[index])

def test_get_variables_data_values3(self):
""" Verifing values from get_variables_data, and only asking for diagnostic variables. """
""" Verifying values from get_variables_data, and only asking for diagnostic variables. """
vars_to_test = ['@Diagnostics.step_time', '@Diagnostics.nbr_steps']
test_data_sets = self._test_get_variables_data(True, 5, 1, vars_to_test, lambda x: None, "TestFile03.mat")

Expand All @@ -1759,7 +1756,7 @@ def test_get_variables_data_values3(self):
np.testing.assert_array_almost_equal(test_data[1], reference_data['@Diagnostics.nbr_steps'][index])

def test_get_variables_data_values4(self):
""" Verifing values from get_variables_data, partial trajectories and checking both time and diagnostic data."""
""" Verifying values from get_variables_data, partial trajectories and checking both time and diagnostic data."""
vars_to_test = ['time', '@Diagnostics.nbr_steps']
test_data_sets = self._test_get_variables_data(True, 5, 1, vars_to_test, lambda x: x + 2, "TestFile04.mat")

Expand Down

0 comments on commit dc56119

Please sign in to comment.