You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have used *module* scoped fixture to create a PostgreSQL container using Testcontainers.
144
-
In the *setup()* fixture function, all the statements before *yield* will be executed before running any test.
145
-
All the statements after *yield* will be executed after running all the tests in the module.
143
+
We have used *module* scoped fixture to start a PostgreSQL container using Testcontainers so that it will only run once for all the tests in the module.
144
+
In the *setup()* fixture function, we are starting the PostgreSQL container and creating the *customers* table. We have added a finalizer to remove the container at the end of all the tests.
146
145
147
146
In the *setup_data()* fixture function, we are deleting all the records in the *customers* table.
148
147
This is a *function* scoped fixture, which will be executed before running every test.
0 commit comments