Hello I would like to assert the contents of tables in my PG schema i.e. make sure it contains the data I'm expecting
I am aware of various options: 1) Compare the actual and expected tables using a sql query, orchestrated by sqlalchemy (i.e. create the actual and expected tables in DB, run the sql comparison script, return the output) 2) Load the actual tables as tuples and compare them with expected tuples using something like assert_result https://github.com/sqlalchemy/sqlalchemy/blob/d933ddd503a1ca0a7c562c51c503139c541e707e/lib/sqlalchemy/testing/assertions.py#L465 3) Load the actual tables as dataframes and compare them with expected dataframes using pandas assert_frame_equal https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.testing.assert_frame_equal.html Any recommendations / thoughts would be much appreciated, both as to the approach and the implementation :-) -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/d786a59c-b995-4614-8023-bd27f20b2dee%40googlegroups.com.