def handle(self, *args, **options): print('Loading test providers') load_providers() if options['tests']: suite = unittest.TestLoader().loadTestsFromNames(options['tests']) else: suite = unittest.TestLoader().loadTestsFromTestCase(TestJob) result = unittest.TextTestRunner().run(suite) print('Removing test providers') delete_providers() if result.errors or result.failures: exit(1)
def handle(self, *args, **options): delete_providers() load_providers() if options["tests"]: suite = unittest.TestLoader().loadTestsFromNames(options["tests"]) result = unittest.TextTestRunner(verbosity=2).run(suite) else: print("Loading test providers") suite = unittest.TestLoader().loadTestsFromTestCase(TestJob) result = unittest.TextTestRunner(verbosity=2).run(suite) print("Removing test providers") delete_providers() if result.errors or result.failures: exit(1)