Closed aaaaalbert closed 8 years ago
Indeed, if I really wanted to run a script after "subprocess" is spawned / before it is stopped, I can just exploit the fact that test cases are run in alphabetical order. This would make the proposed sequence
Setup -- subprocess -- ut_MODULE_aaaaa.....
(first in the list!) -- further test cases -- ut_MODULE_zzzzz.....
(last in the list) -- kill subprocess -- shutdown.
Fixed in #73, closing!
As mentioned in #13, the unit test cases for a module may require a server/service subprocess to be spawned first, and may need specific setup and shutdown scripts too.
However, I find the sequencing weird, in that we do have nominal subprocess scripts that really perform a setup task [https://github.com/SeattleTestbed/nodemanager/blob/3134604ce95dac06a62f7bd042c5f41685c0c6ce/tests/ut_nm_subprocess.py#L6](such as initializing the test nodemanager's vesselinfo file).
Running setup -- subprocess -- test cases -- kill subprocess -- shutdown sounds more reasonable to me.