From 0fc743f19a95b789651108981570f6239d1c01c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Billeter?= Date: Fri, 14 Jul 2017 10:19:20 +0200 Subject: Move ArtifactError to exceptions.py This avoids cyclic imports between element.py and artifactcache.py. --- tests/artifactcache/basics.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/artifactcache') diff --git a/tests/artifactcache/basics.py b/tests/artifactcache/basics.py index c7661820c..6fc8a8b7c 100644 --- a/tests/artifactcache/basics.py +++ b/tests/artifactcache/basics.py @@ -3,7 +3,8 @@ import pytest import tempfile from buildstream import Context, Project -from buildstream._artifactcache import ArtifactCache, ArtifactError +from buildstream.exceptions import _ArtifactError +from buildstream._artifactcache import ArtifactCache from buildstream._pipeline import Pipeline DATA_DIR = os.path.join( @@ -30,7 +31,7 @@ def test_empty_contains(pipeline): # Test that we get an ArtifactError when trying to extract a nonexistent artifact def test_empty_extract(pipeline): - with pytest.raises(ArtifactError) as exc: + with pytest.raises(_ArtifactError) as exc: pipeline.artifacts.extract(pipeline.target) -- cgit v1.2.1