Closed
Description
I am trying to use runtests(...)
to unit-test my stored procedures. What I basically would like to do is
- insert/copy some test-data into the database
- run a test
- remove the test-data
and repeat these three steps for each test function.
I thought I could achieve this by creating a setup function for step 1 and a teardown function for step 3. However, there does not seem to be a way to define which setup/teardown function I want to run for which test function; according to the docs, all test functions just run all functions whose names start with setup
in alphabetical order. I don't need more than one setup/teardown function per test, I just need a different one each time.
Am I generally misunderstanding something here or does pgTAP assume all tests use the same setup/teardown ?
Metadata
Metadata
Assignees
Labels
No labels