Skip to content

Commit

Permalink
coverage: ignore lines that should probably never be hit
Browse files Browse the repository at this point in the history
  • Loading branch information
richteer authored and sjrct committed Oct 23, 2017
1 parent 3836035 commit 048ad4f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion halibot/halauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion halibot/halconfigurer.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ def optionBoolean(self, key, **kwargs):
self.option(Option.Boolean, key, **kwargs)

def configure(self):
pass
pass # pragma: no cover
4 changes: 2 additions & 2 deletions tests/test_configurer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion tests/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 048ad4f

Please sign in to comment.