Skip to content

Commit

Permalink
Modify tests
Browse files Browse the repository at this point in the history
  • Loading branch information
juraskov committed Nov 29, 2024
1 parent 24c7d7b commit f9238e1
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions tests/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,13 @@ def test_system(h2o):
return mlt.System(h2o, box=Box([10, 10, 10]))


def test_system_initialization(h2o):
"""Test initializing a system with a molecule and box."""
system = mlt.System(h2o, box=Box([10, 10, 10]))
assert isinstance(system, mlt.System)
np.testing.assert_array_equal(system.molecules, h2o)
assert isinstance(system.box, Box)
np.testing.assert_array_equal(system.box.size, [10, 10, 10])


def test_random_configuration(test_system):
"""Test generating a random configuration for a system."""
config = test_system.random_configuration(min_dist=1.0)
assert isinstance(config, Configuration)
assert len(config.atoms) == sum(
len(m.atoms) for m in test_system.molecules
)
assert test_system != config


def test_random_configurations(test_system):
Expand Down

0 comments on commit f9238e1

Please sign in to comment.