diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-09-04 11:47:43 -0400 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-09-04 11:48:52 -0400 |
commit | cabfdee6ceb3e0ab265907c3176d19b111c621af (patch) | |
tree | ec320c6a99e514b940ab181ef2e2a32e21f9460d | |
parent | 22995779bc407712f82de20a2f2d867700f6c281 (diff) | |
download | buildstream-cabfdee6ceb3e0ab265907c3176d19b111c621af.tar.gz |
tests/testutils/repo/bzr.py: Skip tests if bzr is not installed
-rw-r--r-- | tests/testutils/repo/bzr.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/testutils/repo/bzr.py b/tests/testutils/repo/bzr.py index 848cff85f..0bb427e23 100644 --- a/tests/testutils/repo/bzr.py +++ b/tests/testutils/repo/bzr.py @@ -1,7 +1,10 @@ import os import shutil import subprocess +import pytest + from .repo import Repo +from ..site import HAVE_BZR BZR_ENV = { "BZR_EMAIL": "Testy McTesterson <testy.mctesterson@example.com>" @@ -10,6 +13,11 @@ BZR_ENV = { class Bzr(Repo): + def __init__(self, directory): + if not HAVE_BZR: + pytest.skip("bzr is not available") + super(Bzr, self).__init__(directory) + def create(self, directory): branch_dir = os.path.join(self.repo, 'trunk') |