def test_mixed_types_to_file(self):
        tempfilename = os.path.join(self.tempdir, 'test.shp')
        s = GeoDataFrame({'geometry': [Point(0, 0),
                                        Polygon([(0, 0), (1, 0), (1, 1)])]})
        with self.assertRaises(ValueError):
            s.to_file(tempfilename)
Test that mixed geometry types raise error when writing to file
dataset/ETHPy150Open geopandas/geopandas/geopandas/tests/test_geodataframe.py/TestDataFrame.test_mixed_types_to_file