summaryrefslogtreecommitdiff
path: root/tests/internals
diff options
context:
space:
mode:
authorThomas Coldrick <thomas.coldrick@codethink.co.uk>2020-01-17 15:22:06 +0000
committerThomas Coldrick <thomas.coldrick@codethink.co.uk>2020-01-23 16:45:35 +0000
commit8aa7e8b6c2ca418aafddf4ce308a9d0ff56cf467 (patch)
tree01fef02fe2ca9634b1ede36d5b96fab66a6532f5 /tests/internals
parentbf5f20704831f58d7ced04e960ca8f7b97c6736c (diff)
downloadbuildstream-8aa7e8b6c2ca418aafddf4ce308a9d0ff56cf467.tar.gz
exceptions: Expose ErrorDomain, ErrorLoadReason
Plugin tests are already accessing this API, but using imports from private modules. For motivation for this to be exposed publicly, note that ErrorDomain is an argument for most things in runcli.py, and LoadErrorReason may be another.
Diffstat (limited to 'tests/internals')
-rw-r--r--tests/internals/context.py3
-rw-r--r--tests/internals/loader.py3
-rw-r--r--tests/internals/pluginloading.py3
-rw-r--r--tests/internals/yaml.py3
4 files changed, 8 insertions, 4 deletions
diff --git a/tests/internals/context.py b/tests/internals/context.py
index c2ee1efb5..a8b9f6dd3 100644
--- a/tests/internals/context.py
+++ b/tests/internals/context.py
@@ -5,7 +5,8 @@ import os
import pytest
from buildstream._context import Context
-from buildstream._exceptions import LoadError, LoadErrorReason
+from buildstream._exceptions import LoadError
+from buildstream.exceptions import LoadErrorReason
DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "context",)
diff --git a/tests/internals/loader.py b/tests/internals/loader.py
index 781d144ae..6fdd9fc3a 100644
--- a/tests/internals/loader.py
+++ b/tests/internals/loader.py
@@ -2,7 +2,8 @@ from contextlib import contextmanager
import os
import pytest
-from buildstream._exceptions import LoadError, LoadErrorReason
+from buildstream.exceptions import LoadErrorReason
+from buildstream._exceptions import LoadError
from buildstream._project import Project
from buildstream._loader import MetaElement
from buildstream._loader.loader import _NO_PROGRESS
diff --git a/tests/internals/pluginloading.py b/tests/internals/pluginloading.py
index 83944bbd9..0685b09da 100644
--- a/tests/internals/pluginloading.py
+++ b/tests/internals/pluginloading.py
@@ -3,7 +3,8 @@ import os
import pytest
from buildstream._project import Project
-from buildstream._exceptions import LoadError, LoadErrorReason
+from buildstream._exceptions import LoadError
+from buildstream.exceptions import LoadErrorReason
from buildstream._pipeline import Pipeline
from tests.testutils import dummy_context
diff --git a/tests/internals/yaml.py b/tests/internals/yaml.py
index 7b711575c..a4f8d08cc 100644
--- a/tests/internals/yaml.py
+++ b/tests/internals/yaml.py
@@ -4,7 +4,8 @@ from io import StringIO
import pytest
from buildstream import _yaml, Node, ProvenanceInformation, SequenceNode
-from buildstream._exceptions import LoadError, LoadErrorReason
+from buildstream.exceptions import LoadErrorReason
+from buildstream._exceptions import LoadError
DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "yaml",)