Skip to content

Commit

Permalink
Added test that replicated the exact error type in #365
Browse files Browse the repository at this point in the history
  • Loading branch information
MicahGale committed Feb 6, 2024
1 parent 4c17ea7 commit 89e2766
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_material.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ def test_material_init(self):
for component in material.material_components:
self.assertEqual(material.material_components[component].fraction, 0.5)

# test implicit library with syntax tree errors
in_str = """m1 1001 0.33
8016 0.666667"""
input_card = Input(in_str.split("\n"), BlockType.DATA)
material = Material(input_card)

# test implicit library
in_str = "M20 1001 0.5 2001 0.3 8016.710nc 0.5"
input_card = Input([in_str], BlockType.DATA)
Expand All @@ -42,6 +48,7 @@ def test_material_init(self):
for component in material.material_components:
self.assertEqual(material.material_components[component].fraction, 0.5)

# test weight fraction
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 89e2766

Please sign in to comment.