def test_absent_surface_with_dummy_strategy(text, expected): actual = srp.parse( text, transformations=ti.TransformationDummyIndex(), ) assert actual == expected
def test_absent_surface_with_ignore_strategy(text, expected): actual = srp.parse(text, transformations=IgnoringIndex()) assert actual == expected assert 'transform' not in actual.options
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())
def test_good_path(text, expected): actual = srp.parse(text) assert actual.mcnp_words() == expected.mcnp_words()