diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-09-04 11:57:06 -0400 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-09-04 11:57:06 -0400 |
commit | 0505f9adc409e54ec5b602310c66b2da4a14930c (patch) | |
tree | 61230e9bf6c2b40d3138d8015a4136d00dc226f6 | |
parent | 99f7febbcf697ad198af4a493feb21f7f56529dc (diff) | |
download | buildstream-0505f9adc409e54ec5b602310c66b2da4a14930c.tar.gz |
tests/testutils/repo/ostree.py: Skip tests if the ostree cli is not installed
-rw-r--r-- | tests/testutils/repo/ostree.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/testutils/repo/ostree.py b/tests/testutils/repo/ostree.py index 2b7546645..f92f40fcb 100644 --- a/tests/testutils/repo/ostree.py +++ b/tests/testutils/repo/ostree.py @@ -1,9 +1,16 @@ import subprocess from .repo import Repo +from ..site import HAVE_OSTREE_CLI + class OSTree(Repo): + def __init__(self, directory): + if not HAVE_OSTREE_CLI: + pytest.skip("ostree cli is not available") + super(OSTree, self).__init__(directory) + def create(self, directory): subprocess.call(['ostree', 'init', '--repo', self.repo, |