Skip to content

Commit

Permalink
Made test case to replicate #396.
Browse files Browse the repository at this point in the history
  • Loading branch information
MicahGale committed Jul 2, 2024
1 parent 8be15b7 commit 292dcef
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/test_source.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import montepy
from montepy.data_inputs.data_parser import parse_data
from montepy.input_parser.block_type import BlockType
from montepy.input_parser.mcnp_input import Input

import pytest


@pytest.mark.parametrize(
"line", ["sdef cel=d1 erg=d2 pos=fcel d3 ext=fcel d4 axs=0 0 1 rad=d5"]
)
def test_source_parse_and_parrot(line):
input = Input([line], BlockType.DATA)
data = parse_data(input)
assert data._tree.format() == line

0 comments on commit 292dcef

Please sign in to comment.