How to run functional/scenario test and keep database at the end?

I am running the test with postgres (TRYTON_CONFIG, DB_NAME).
Before the test ends I go into the database (psql). I do this to stop the teardown from deleting the database (session using database).
I want to login into the resulting database afterwards.

How can I tell the tests not to delete the database at the end?

Hello,

You can run the scenario “manually”:

TRYTOND_CONFIG="/path/to/test.conf" DB_NAME="$scenario_name" python -m doctest -f "$scenario_path"

You can then latter update the admin password to “admin” with:

trytond-admin -d "$scenario_name" -p

This is how I use to do it (doctest). The scenario is complex uses external files and fails when running doctest directly. Now I run it with unittest but have the drop db issue at the end. I guess I could try to fix the problems with files when running the scenario with doctest.