summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-11-18 18:45:14 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-11-18 18:57:43 +0900
commit5458a9251cc70373d13f25e3f6dc2fd9dfe75d03 (patch)
treee34cea118df59a64a304926fffb9f7bbcd089039
parentdc3169ec201db997574025963736c85aea71befc (diff)
downloadbuildstream-5458a9251cc70373d13f25e3f6dc2fd9dfe75d03.tar.gz
tests/testutils/runcli.bst: Fix get_pipeline() to not use mutable default argument
-rw-r--r--tests/testutils/runcli.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/testutils/runcli.py b/tests/testutils/runcli.py
index 7cd98ee2e..f165232dc 100644
--- a/tests/testutils/runcli.py
+++ b/tests/testutils/runcli.py
@@ -149,7 +149,10 @@ class Cli():
# Fetch the elements that would be in the pipeline with the given
# arguments.
#
- def get_pipeline(self, project, elements, except_=[], scope='plan'):
+ def get_pipeline(self, project, elements, except_=None, scope='plan'):
+ if except_ is None:
+ except_ = []
+
args = ['show', '--deps', scope, '--format', '%{name}']
args += list(itertools.chain.from_iterable(zip(itertools.repeat('--except'), except_)))