From e7812a7cbc99c810a951679ef1b61b1368a9cdf0 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Sun, 9 Jul 2017 11:00:30 +0200 Subject: Exclude two methods from coverage report One is an abstract method anyways and the other one is trivial. It just calls two other functions that are already covered by tests. This results in 100% test coverage for alot/addressbook/*. --- alot/addressbook/__init__.py | 2 +- alot/addressbook/external.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'alot/addressbook') diff --git a/alot/addressbook/__init__.py b/alot/addressbook/__init__.py index f30c7274..17800b33 100644 --- a/alot/addressbook/__init__.py +++ b/alot/addressbook/__init__.py @@ -27,7 +27,7 @@ class AddressBook(object): self.reflags = re.IGNORECASE if ignorecase else 0 @abc.abstractmethod - def get_contacts(self): + def get_contacts(self): # pragma no cover """list all contacts tuples in this abook as (name, email) tuples""" return [] diff --git a/alot/addressbook/external.py b/alot/addressbook/external.py index 9de86f36..53f1e464 100644 --- a/alot/addressbook/external.py +++ b/alot/addressbook/external.py @@ -44,7 +44,7 @@ class ExternalAddressbook(AddressBook): def get_contacts(self): return self._call_and_parse(self.commandline) - def lookup(self, prefix): + def lookup(self, prefix): # pragma: no cover if self.external_filtering: return self._call_and_parse(self.commandline + " " + prefix) else: -- cgit v1.2.3