예제 #1
0
 def test_unpack_2(self):
     """String value with no matching provided."""
     val = ('item name', str)
     assert lws.parse_schema_val(val) == (str, '.*')
예제 #2
0
 def test_unpack_3(self):
     """Non-string value with no matching provided."""
     val = ('item number', int)
     assert lws.parse_schema_val(val) == (int, '')
예제 #3
0
 def test_unpack_1(self):
     """Ordinary value."""
     val = ('item name', str, r'name')
     assert lws.parse_schema_val(val) == (str, 'name')