Previously testify's main entry point was the constructor of the TestProgram class. This entry point also "returned" by calling sys.exit(). This makes it impossible to call from other code.
I've moved the main entry point to test_program.main. It still calls sys.exit() in main, but now you could call TestProgram().run() and handle the response.
My use case here is an acceptance test suite that sets up a sandbox. I would like to be able to setup the sandbox in a context manager around testify. Something like this:
Previously testify's main entry point was the constructor of the
TestProgram
class. This entry point also "returned" by callingsys.exit()
. This makes it impossible to call from other code.I've moved the main entry point to
test_program.main
. It still callssys.exit()
in main, but now you could callTestProgram().run()
and handle the response.My use case here is an acceptance test suite that sets up a sandbox. I would like to be able to setup the sandbox in a context manager around testify. Something like this: