From ed9a94a4c8a524c6fe41397ac490b8b0a747ba90 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Tue, 2 Jan 2018 17:34:29 +0900 Subject: plugins/sources/local.py: pragma nocover on unreachable code The local plugin is always Consistency.CACHED, this means that fetch(), set_ref() and get_ref() methods will never be called. Instead of omitting them, just "pragma: nocover" on the `pass` statements, making our coverage report more realistic. --- buildstream/plugins/sources/local.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/buildstream/plugins/sources/local.py b/buildstream/plugins/sources/local.py index e2a769e1c..830df873f 100644 --- a/buildstream/plugins/sources/local.py +++ b/buildstream/plugins/sources/local.py @@ -77,14 +77,14 @@ class LocalSource(Source): # We dont have a ref, we're a local file... def get_ref(self): - return None + return None # pragma: nocover def set_ref(self, ref, node): - pass + pass # pragma: nocover def fetch(self): # Nothing to do here for a local source - pass + pass # pragma: nocover def stage(self, directory): -- cgit v1.2.1