docstr: Tests that the row order in db table follows the order of the original frame.
docstr_tok: ["Tests","that","the","row","order","in","db","table","follows","the","order","of","the","original","frame","."]
code: def test_row_order(self, engine_postgis, df_nybb):
      """
      Tests that the row order in db table follows the order of the original frame.
      """
      engine = engine_postgis
  
      table = "row_order_test"
      correct_order = df_nybb["BoroCode"].tolist()
  
      write_postgis(
          df_nybb, con=engine, name=table, if_exists="replace"
      )
  
      # Check that the row order matches
      sql = text("SELECT * FROM {table};".format(table=table))
      df = read_postgis(sql, engine, geom_col="geometry")
      assert df["BoroCode"].tolist() == correct_order
  
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 28 for calling the TestIO obj's underlying member method code with example usage: obj.test_row_order(engine_postgis, df_nybb) without return types