Skip to content

Commit 153226e

Browse files
committed
edits to comments within the new tests for run.py
1 parent 575089a commit 153226e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

tests/test_CodeEntropy/test_run.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,19 +281,17 @@ def test_new_U_select_frame(self, MockMerge, MockAnalysisFromFunction):
281281
mock_merged_universe = MagicMock()
282282
MockMerge.return_value = mock_merged_universe
283283

284-
# Call the method under test
285284
run_manager = RunManager("folder")
286285
result = run_manager.new_U_select_frame(mock_universe)
287286

288-
# Assertions
289287
mock_universe.select_atoms.assert_called_once_with("all", updating=True)
290288
MockMerge.assert_called_once_with(mock_select_atoms)
291289

292290
# Ensure the 'load_new' method was called with the correct arguments
293291
mock_merged_universe.load_new.assert_called_once()
294292
args, kwargs = mock_merged_universe.load_new.call_args
295293

296-
# Use np.testing to assert that the arrays are passed correctly
294+
# Assert that the arrays are passed correctly
297295
np.testing.assert_array_equal(args[0], coords)
298296
np.testing.assert_array_equal(kwargs["forces"], forces)
299297
np.testing.assert_array_equal(kwargs["dimensions"], dims)
@@ -337,21 +335,19 @@ def test_new_U_select_atom(self, MockMerge, MockAnalysisFromFunction):
337335
mock_merged_universe = MagicMock()
338336
MockMerge.return_value = mock_merged_universe
339337

340-
# Call the method under test
341338
run_manager = RunManager("folder")
342339
result = run_manager.new_U_select_atom(
343340
mock_universe, select_string="resid 1-10"
344341
)
345342

346-
# Assertions
347343
mock_universe.select_atoms.assert_called_once_with("resid 1-10", updating=True)
348344
MockMerge.assert_called_once_with(mock_select_atoms)
349345

350346
# Ensure the 'load_new' method was called with the correct arguments
351347
mock_merged_universe.load_new.assert_called_once()
352348
args, kwargs = mock_merged_universe.load_new.call_args
353349

354-
# Use np.testing to assert that the arrays are passed correctly
350+
# Assert that the arrays are passed correctly
355351
np.testing.assert_array_equal(args[0], coords)
356352
np.testing.assert_array_equal(kwargs["forces"], forces)
357353
np.testing.assert_array_equal(kwargs["dimensions"], dims)

0 commit comments

Comments
 (0)