def test_from_str_given_various_valid_string_returns_expected_specification( self, value, expected): # Arrange, Act spec = BarSpecification.from_str(value) # Assert assert spec == expected
def test_from_str_given_various_invalid_strings_raises_value_error(self, value): # Arrange, Act, Assert with pytest.raises(ValueError): BarSpecification.from_str(value)