Yes, if the function was wrapped into a class that  subclassed `unittest.TestCase` it'd work. Though I'm not a fan of not using our test runner functionality to simplify test code :)