docstr: Tests that the warning is raised if table CRS differs from frame.
docstr_tok: ["Tests","that","the","warning","is","raised","if","table","CRS","differs","from","frame","."]
code: def test_append_with_different_crs(self, engine_postgis, df_nybb):
      """
      Tests that the warning is raised if table CRS differs from frame.
      """
      engine = engine_postgis
  
      table = "nybb"
      write_postgis(
          df_nybb, con=engine, name=table, if_exists="replace"
      )
  
      # Reproject
      df_nybb2 = df_nybb.to_crs(epsg=4326)
  
      # Should raise error when appending
      with pytest.raises(ValueError, match="CRS of the target table"):
          write_postgis(
              df_nybb2, con=engine, name=table, if_exists="append"
          )
  
imports: import os
  import warnings
  import pandas
  import geopandas
  from geopandas import GeoDataFrame, read_file, read_postgis
  import geopandas._compat
  from geopandas.io.sql import _get_conn, _write_postgis
  from geopandas.tests.util import create_postgis, create_spatialite, validate_boro_df
  import pytest
label_desc: Use image node_id 30 for calling the TestIO obj's underlying member method code with example usage: obj.test_append_with_different_crs(engine_postgis, df_nybb) without return types