@pytest.mark.xfail(reason='OGR silently fails to convert strings')
def test_write_mismatch(self):
    'TOFIX: OGR silently fails to convert strings'
    schema = {'geometry': 'Point', 'properties': {'label': 'str', 'num': 'int'}}
    with fiona.open(os.path.join(self.tempdir, 'test-write-fail.shp'), 'w', driver='ESRI Shapefile', schema=schema, encoding='latin1') as c:
        c.writerecords([{'type': 'Feature', 'geometry': {'type': 'Point', 'coordinates': [0, 0]}, 'properties': {'label': u'徐汇区', 'num': 0}}])
    with fiona.open(os.path.join(self.tempdir), encoding='latin1') as c:
        f = next(iter(c))
        self.assertEqual(f['properties']['label'], u'徐汇区')
TOFIX: OGR silently fails to convert strings
@pytest.mark.xfail(reason='OGR silently fails to convert strings')
def test_write_mismatch(self):
    
    schema = {'geometry': 'Point', 'properties': {'label': 'str', 'num': 'int'}}
    with fiona.open(os.path.join(self.tempdir, 'test-write-fail.shp'), 'w', driver='ESRI Shapefile', schema=schema, encoding='latin1') as c:
        c.writerecords([{'type': 'Feature', 'geometry': {'type': 'Point', 'coordinates': [0, 0]}, 'properties': {'label': u'徐汇区', 'num': 0}}])
    with fiona.open(os.path.join(self.tempdir), encoding='latin1') as c:
        f = next(iter(c))
        self.assertEqual(f['properties']['label'], u'徐汇区')