Generating a UUID per invocation? #2279
-
Hi, What I'm currently trying is something like this below (I also need to load an env file hence the use of python-dotenv[cli]
But this doesn't work as I don't think Is there a away tox can support this? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
While this may work via tox, usually you do this in your test code, e.g. in a pytest fixture which does setup and teardown (after the yield keyword). |
Beta Was this translation helpful? Give feedback.
-
Ok - you may have reasons, but this sounds against all odds. Usually you do not want to have test data in a database, but rather have Python factories which create the test data. Given you have good reasons or you do not care :-), here is a solution for your current problem: tox.ini
run.sh
|
Beta Was this translation helpful? Give feedback.
-
@jugmac00 I found a perfect solution:
I used the envname with the "-" removed as a UUID. |
Beta Was this translation helpful? Give feedback.
@jugmac00 I found a perfect solution:
tox-backticks
. This allowed me to do thisI used the envname with the "-" removed as a UUID.
Thanks for the rubber ducking!