def test_convert_json_field_to_pandas_type(self, inp, exp):
     field = {'name': 'foo'}
     field.update(inp)
     assert convert_json_field_to_pandas_type(field) == exp
 def test_convert_json_field_to_pandas_type_raises(self, inp):
     field = {'type': inp}
     with pytest.raises(ValueError,
                        match=("Unsupported or invalid field "
                               "type: {}".format(inp))):
         convert_json_field_to_pandas_type(field)
 def test_convert_json_field_to_pandas_type_raises(self, inp):
     field = {'type': inp}
     with tm.assert_raises_regex(
             ValueError, "Unsupported or invalid field "
             "type: {}".format(inp)):
         convert_json_field_to_pandas_type(field)
 def test_convert_json_field_to_pandas_type_raises(self, inp):
     field = {'type': inp}
     with pytest.raises(ValueError, match=("Unsupported or invalid field "
                                           "type: {}".format(inp))):
         convert_json_field_to_pandas_type(field)
 def test_convert_json_field_to_pandas_type(self, inp, exp):
     field = {'name': 'foo'}
     field.update(inp)
     assert convert_json_field_to_pandas_type(field) == exp
 def test_convert_json_field_to_pandas_type_raises(self, inp):
     field = {'type': inp}
     with tm.assert_raises_regex(ValueError, "Unsupported or invalid field "
                                 "type: {}".format(inp)):
         convert_json_field_to_pandas_type(field)
Exemple #7
0
 def test_convert_json_field_to_pandas_type(self, inp, exp):
     field = {"name": "foo"}
     field.update(inp)
     assert convert_json_field_to_pandas_type(field) == exp