aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2023-02-02 22:25:10 +0200
committerArthur Zamarin <arthurzam@gentoo.org>2023-02-02 22:25:10 +0200
commitafef868cd7c3a249864bdc2b4d98b74ef808be3f (patch)
tree1484526b672b2ba6c09749456c75efb03199d60a
parentrefactor(config): first pass of typing annotations for pkgcore.config.* (diff)
downloadpkgcore-afef868cd7c3a249864bdc2b4d98b74ef808be3f.tar.gz
pkgcore-afef868cd7c3a249864bdc2b4d98b74ef808be3f.tar.bz2
pkgcore-afef868cd7c3a249864bdc2b4d98b74ef808be3f.zip
ebuild/test_eapi: fix tests artifacts in EBD_PATH
Bug: https://bugs.gentoo.org/888685 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rw-r--r--tests/ebuild/test_eapi.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/ebuild/test_eapi.py b/tests/ebuild/test_eapi.py
index cbe0e3a52..cf7ef0906 100644
--- a/tests/ebuild/test_eapi.py
+++ b/tests/ebuild/test_eapi.py
@@ -48,10 +48,13 @@ class TestEAPI:
test_eapi = EAPI.register(magic="test1", optionals={"bash_compat": "4.1"})
assert test_eapi._magic == "test1"
- def test_is_supported(self, caplog):
+ def test_is_supported(self, tmp_path, caplog):
assert eapi6.is_supported
- with mock.patch.dict(eapi.EAPI.known_eapis):
+ mock_ebd_temp = str(shutil.copytree(EBD_PATH, tmp_path / "ebd"))
+ with mock.patch.dict(eapi.EAPI.known_eapis), mock.patch(
+ "pkgcore.ebuild.eapi.const.EBD_PATH", mock_ebd_temp
+ ):
# partially supported EAPI is flagged as such
test_eapi = EAPI.register("test", optionals={"is_supported": False})
assert test_eapi.is_supported