diff options
Diffstat (limited to 'tests/testutils/artifactshare.py')
-rw-r--r-- | tests/testutils/artifactshare.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/testutils/artifactshare.py b/tests/testutils/artifactshare.py index 41673ca1d..0fca42a6c 100644 --- a/tests/testutils/artifactshare.py +++ b/tests/testutils/artifactshare.py @@ -6,7 +6,6 @@ from collections import namedtuple from contextlib import contextmanager from multiprocessing import Process, Queue -import pytest_cov from buildstream._cas import CASCache from buildstream._cas.casserver import create_server @@ -68,7 +67,13 @@ class ArtifactShare(): # Run the artifact server. # def run(self, q): - pytest_cov.embed.cleanup_on_sigterm() + + try: + import pytest_cov + except ImportError: + pass + else: + pytest_cov.embed.cleanup_on_sigterm() try: # Optionally mock statvfs |