Skip to content

Commit

Permalink
Added test for implicit library that causes SyntaxError.
Browse files Browse the repository at this point in the history
  • Loading branch information
MicahGale committed Feb 6, 2024
1 parent 5cf1e1e commit 4c17ea7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_material.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ def test_material_init(self):
for component in material.material_components:
self.assertEqual(material.material_components[component].fraction, 0.5)

# test implicit library
in_str = "M20 1001 0.5 2001 0.3 8016.710nc 0.5"
input_card = Input([in_str], BlockType.DATA)
material = Material(input_card)
self.assertEqual(material.number, 20)
self.assertEqual(material.old_number, 20)
self.assertTrue(material.is_atom_fraction)
for component in material.material_components:
self.assertEqual(material.material_components[component].fraction, 0.5)

in_str = "M20 1001.80c -0.5 8016.80c -0.5"
input_card = Input([in_str], BlockType.DATA)
material = Material(input_card)
Expand Down

0 comments on commit 4c17ea7

Please sign in to comment.