diff options
author | Tristan Maat <tristan.maat@codethink.co.uk> | 2019-09-18 17:55:19 +0100 |
---|---|---|
committer | Tristan Maat <tristan.maat@codethink.co.uk> | 2019-10-10 12:21:15 +0100 |
commit | 17144d84c2b63daf6e3aa9b42c6c773f134e8660 (patch) | |
tree | 1fd9a4e53ed641592dd26e3d07d241554463a4cf /src/buildstream/_project.py | |
parent | acf99b789a92e9e124e9492d1dbbc34b83f5ab23 (diff) | |
download | buildstream-17144d84c2b63daf6e3aa9b42c6c773f134e8660.tar.gz |
testutils/context.py: Mock tasks instead of accepting Nones
To ensure that we only disable element loading task progress reporting
for very specific code paths, we need to teach the test suite to be a
bit smarter.
For this reason we now mock a _Task object and return it in our mock
context's relevant method invocations.
Other code paths that deliberately invoke the loader without task
reporting now mark their loads with NO_PROGRESS.
Diffstat (limited to 'src/buildstream/_project.py')
-rw-r--r-- | src/buildstream/_project.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buildstream/_project.py b/src/buildstream/_project.py index 6ae8aa9db..7ba93bba4 100644 --- a/src/buildstream/_project.py +++ b/src/buildstream/_project.py @@ -433,7 +433,7 @@ class Project(): # def load_elements(self, targets, *, rewritable=False): with self._context.messenger.simple_task("Loading elements", silent_nested=True) as task: - meta_elements = self.loader.load(targets, rewritable=rewritable, ticker=None, task=task) + meta_elements = self.loader.load(targets, task, rewritable=rewritable, ticker=None) with self._context.messenger.simple_task("Resolving elements") as task: if task: |