Beispiel #1
0
 def it_can_convert_a_string_to_an_int(self, from_xml_fixture):
     str_value, expected_value, expected_exception = from_xml_fixture
     if expected_exception is None:
         value = BaseIntType.convert_from_xml(str_value)
         assert value == expected_value
     else:
         with pytest.raises(expected_exception):
             BaseIntType.convert_from_xml(str_value)
Beispiel #2
0
 def it_can_convert_a_string_to_an_int(self, from_xml_fixture):
     str_value, expected_value, expected_exception = from_xml_fixture
     if expected_exception is None:
         value = BaseIntType.convert_from_xml(str_value)
         assert value == expected_value
     else:
         with pytest.raises(expected_exception):
             BaseIntType.convert_from_xml(str_value)
Beispiel #3
0
 def it_can_convert_an_int_to_a_string(self, to_xml_fixture):
     value, expected_str_value = to_xml_fixture
     str_value = BaseIntType.convert_to_xml(value)
     assert str_value == expected_str_value
Beispiel #4
0
 def it_can_convert_an_int_to_a_string(self, to_xml_fixture):
     value, expected_str_value = to_xml_fixture
     str_value = BaseIntType.convert_to_xml(value)
     assert str_value == expected_str_value