Skip to content

Commit

Permalink
Add failing test case for issue #549 (empty Importance object print)
Browse files Browse the repository at this point in the history
  • Loading branch information
kordusas committed Mar 8, 2025
1 parent e71d1c4 commit 81a4055
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_importance.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from montepy.errors import *
from montepy.input_parser import mcnp_input, block_type
import os
from montepy.data_inputs.importance import Importance
import pytest


class TestImportance(TestCase):
Expand All @@ -31,6 +33,10 @@ def test_importance_init_cell(self):
with self.assertRaises(ValueError):
cell = Cell(card)

def test_importance_init_empty(self):
importance = Importance()
assert str(importance) == "Importance object is empty"

def test_importance_init_data(self):
in_str = "IMP:N,P 1 0"
card = mcnp_input.Input([in_str], block_type.BlockType.CELL)
Expand Down

0 comments on commit 81a4055

Please sign in to comment.