()
| 341 | |
| 342 | |
| 343 | def main(): |
| 344 | test_keyword = None |
| 345 | if len(sys.argv) > 1: |
| 346 | test_keyword = sys.argv[1] |
| 347 | |
| 348 | runner = unittest.TextTestRunner(verbosity=2) |
| 349 | # Hack way to load the tests from the current file |
| 350 | test_suite = unittest.defaultTestLoader.loadTestsFromModule(sys.modules[__name__]) |
| 351 | # if test keyword supplied, filter |
| 352 | if test_keyword: |
| 353 | test_suite = filter_test_suite(test_suite, test_keyword) |
| 354 | |
| 355 | runner.run(test_suite) |
| 356 | |
| 357 | |
| 358 | if __name__ == "__main__": |
no test coverage detected