From 095cea7ab9518dfd9658b03df69ab876bb6e1268 Mon Sep 17 00:00:00 2001 From: derAnfaenger Date: Tue, 22 Aug 2017 09:46:16 +0200 Subject: [PATCH] codecov: Document line capture issue in code. --- tools/test-bots | 2 ++ tools/test-botserver | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tools/test-bots b/tools/test-bots index 571f6b7..0ef8429 100755 --- a/tools/test-bots +++ b/tools/test-bots @@ -20,6 +20,8 @@ def load_tests_from_modules(names, template): def load_all_tests(): loader = unittest.defaultTestLoader + # Codecov seems to work only when using loader.discover. It failed to capture line executions + # for functions like loader.loadTestFromModule or loader.loadTestFromNames. return loader.discover('zulip_bots') def parse_args(available_bots): diff --git a/tools/test-botserver b/tools/test-botserver index 58444a0..f6bf561 100755 --- a/tools/test-botserver +++ b/tools/test-botserver @@ -26,6 +26,8 @@ def main(): cov.load() cov.start() + # Codecov seems to work only when using loader.discover. It failed to capture line executions + # for functions like loader.loadTestFromModule or loader.loadTestFromNames. test_suites = unittest.defaultTestLoader.discover('zulip_botserver') suite = unittest.TestSuite(test_suites) runner = unittest.TextTestRunner(verbosity=2)