I've used a subclass instead. I can't just use `__call__` directly because it has logic I want tested in it, and it then calls `_run_main` which by default raises and exception. The subclass is working nicely and prevents the initial problem.