diff options
author | Tristan van Berkom <tristan@codethink.co.uk> | 2020-12-16 14:09:21 +0900 |
---|---|---|
committer | Tristan van Berkom <tristan@codethink.co.uk> | 2020-12-21 14:46:14 +0900 |
commit | 98c807002cf3beb2110695083450a42fe8feefd0 (patch) | |
tree | 54699cab737ebd433607254ebe1980f33f462dc9 | |
parent | 95c3330af22b33c51157e7e02770d2cc58ab3e6a (diff) | |
download | buildstream-98c807002cf3beb2110695083450a42fe8feefd0.tar.gz |
testing/runcli.py: Create the directory in Cli() __init__()
Instead of requiring every fixture to do it separately.
-rw-r--r-- | src/buildstream/testing/runcli.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/buildstream/testing/runcli.py b/src/buildstream/testing/runcli.py index 7a69191ed..6a170a469 100644 --- a/src/buildstream/testing/runcli.py +++ b/src/buildstream/testing/runcli.py @@ -247,6 +247,8 @@ class Cli: self.verbose = verbose self.artifact = TestArtifact() + os.makedirs(directory) + if default_options is None: default_options = [] @@ -734,7 +736,6 @@ class TestArtifact: @pytest.fixture() def cli(tmpdir): directory = os.path.join(str(tmpdir), "cache") - os.makedirs(directory) return Cli(directory) @@ -747,8 +748,6 @@ def cli(tmpdir): @pytest.fixture() def cli_integration(tmpdir, integration_cache): directory = os.path.join(str(tmpdir), "cache") - os.makedirs(directory) - fixture = CliIntegration(directory) # We want to cache sources for integration tests more permanently, @@ -778,8 +777,6 @@ def cli_integration(tmpdir, integration_cache): @pytest.fixture() def cli_remote_execution(tmpdir, remote_services): directory = os.path.join(str(tmpdir), "cache") - os.makedirs(directory) - fixture = CliRemote(directory) artifacts = [] |