From 048ad4f6986998ad63fcc8e2ddb76a46ddeb7465 Mon Sep 17 00:00:00 2001 From: Eric Richter Date: Sat, 21 Oct 2017 16:02:04 -0500 Subject: [PATCH] coverage: ignore lines that should probably never be hit --- halibot/halauth.py | 2 +- halibot/halconfigurer.py | 2 +- tests/test_configurer.py | 4 ++-- tests/util.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/halibot/halauth.py b/halibot/halauth.py index 3cdf797..00cbf8f 100644 --- a/halibot/halauth.py +++ b/halibot/halauth.py @@ -42,7 +42,7 @@ def write_perms(self): with open(self.path, "w") as f: f.write(json.dumps(temp, indent=4)) - except Exception as e: + except Exception as e: # pragma: no cover self.log.error("Error storing permissions: {}".format(e)) def grantPermission(self, ri, identity, perm): diff --git a/halibot/halconfigurer.py b/halibot/halconfigurer.py index ea14a26..60a00e5 100644 --- a/halibot/halconfigurer.py +++ b/halibot/halconfigurer.py @@ -84,4 +84,4 @@ def optionBoolean(self, key, **kwargs): self.option(Option.Boolean, key, **kwargs) def configure(self): - pass + pass # pragma: no cover diff --git a/tests/test_configurer.py b/tests/test_configurer.py index 064b43b..46267a4 100644 --- a/tests/test_configurer.py +++ b/tests/test_configurer.py @@ -52,7 +52,7 @@ def configure(self): # Yay, we type errored as expected return - self.assertTrue(False) + self.assertTrue(False) # pragma: no cover @patch('halibot.halconfigurer.get_input', return_value=2.1) def test_optionNumber_int(self, input): @@ -88,7 +88,7 @@ def configure(self): # Yay, we type errored as expected return - self.assertTrue(False) + self.assertTrue(False) # pragma: no cover @patch('halibot.halconfigurer.get_input', return_value=True) def test_optionBoolean_true(self, input): diff --git a/tests/util.py b/tests/util.py index 680334a..2659338 100644 --- a/tests/util.py +++ b/tests/util.py @@ -11,7 +11,7 @@ def waitOrTimeout(timeout, condition): break time.sleep(0.1) else: - print("warning: timeout reached") + print("warning: timeout reached") # pragma: no cover # Provides a unique bot in self.bot for every test case