summaryrefslogtreecommitdiff
path: root/src/buildstream/testing/_utils/junction.py
diff options
context:
space:
mode:
authorAngelos Evripiotis <jevripiotis@bloomberg.net>2019-06-11 15:06:08 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-06-18 09:45:00 +0000
commit5ae6ee9534e9f301b9db1b256883bb14b63efb73 (patch)
tree4268a34d1a3fb37563829acb532e70d456d8bc84 /src/buildstream/testing/_utils/junction.py
parentd139abbc8cb322ab1249b4ae7b23f86e20d4eb93 (diff)
downloadbuildstream-5ae6ee9534e9f301b9db1b256883bb14b63efb73.tar.gz
testing/_utils: match git methods to base class
Update 'source_config' of Git and _SimpleGit to match the Repo base class. This ensures that they are fully substitutable Repos. Introduce 'source_config_extra' to allow explicit usage of extended functionality, which wouldn't necessarily be supported by a different subclass. By making the signatures deliberately match, we can use PyLint to ensure the signatures don't accidentally differ.
Diffstat (limited to 'src/buildstream/testing/_utils/junction.py')
-rw-r--r--src/buildstream/testing/_utils/junction.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/buildstream/testing/_utils/junction.py b/src/buildstream/testing/_utils/junction.py
index ca059eb8b..2bf53ac7c 100644
--- a/src/buildstream/testing/_utils/junction.py
+++ b/src/buildstream/testing/_utils/junction.py
@@ -60,7 +60,10 @@ class _SimpleGit(Repo):
universal_newlines=True,
).stdout.strip()
- def source_config(self, ref=None, checkout_submodules=None):
+ def source_config(self, ref=None):
+ return self.source_config_extra(ref)
+
+ def source_config_extra(self, ref=None, checkout_submodules=None):
config = {
'kind': 'git',
'url': 'file://' + self.repo,