Especially, definately, also DDL (where possible). There are only few DDL statements that cannot be run transactionally (most of which is [CREATE / RE]INDEX CONCURRENTLY), but the rest of DDL can best be tested before committing to the result, especially when migrating between versioned schemas: you don't want half-applied migrations.
Or just use PL/pgSQL stored functions which are inherently transactions[1]
No bad thing anyway as it has a side-benefit of helping the fight against SQL injection attacks etc.
[1] https://www.postgresql.org/docs/14/plpgsql-transactions.html
How do you test what wasn't changed, how does that work. Do you select before and after and compare certain rows or tables and if so random ones or which ones? A small example would be awesome.