Skip to content

Commit

Permalink
test_system: Test for mol_id when None
Browse files Browse the repository at this point in the history
Added a small test when the molecule ID is set to None (std::nullopt) in
C++.
  • Loading branch information
amritagos committed Aug 9, 2024
1 parent ea42da0 commit 4752272
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ def test_atom():
assert atom.mol_id == mol_id
assert atom.position == [33.701145, 31.147538, 48.163726]

# test what happens when you set mol_id to None
atom1 = solu.james.Atom(id, type, None, [33.701145, 31.147538, 48.163726])

assert atom1.id == atom.id
assert atom1.type == atom.type
assert atom1.mol_id == None
assert atom1.position == atom.position


def test_system_creation():
"""
Expand Down

0 comments on commit 4752272

Please sign in to comment.