commit:     afef868cd7c3a249864bdc2b4d98b74ef808be3f
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  2 20:25:10 2023 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Thu Feb  2 20:25:10 2023 +0000
URL:        
https://gitweb.gentoo.org/proj/pkgcore/pkgcore.git/commit/?id=afef868c

ebuild/test_eapi: fix tests artifacts in EBD_PATH

Bug: https://bugs.gentoo.org/888685
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 tests/ebuild/test_eapi.py | 7 +++++--
 1 file 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

Reply via email to