Esempio n. 1
0
def test_absent_surface_with_dummy_strategy(text, expected):
    actual = srp.parse(
        text,
        transformations=ti.TransformationDummyIndex(),
    )
    assert actual == expected
Esempio n. 2
0
def test_absent_surface_with_ignore_strategy(text, expected):
    actual = srp.parse(text, transformations=IgnoringIndex())
    assert actual == expected
    assert 'transform' not in actual.options
Esempio n. 3
0
def test_absent_surface_with_raise_strategy(text, msg_contains):
    with pytest.raises(KeyError,
                       match=f"Transformation #{msg_contains} is not found"):
        srp.parse(text, transformations=ti.TransformationStrictIndex())
Esempio n. 4
0
def test_good_path(text, expected):
    actual = srp.parse(text)
    assert actual.mcnp_words() == expected.mcnp_words()