From 7e5bc30b934feaabdede293cca488e45a4c10d86 Mon Sep 17 00:00:00 2001 From: Chris Kuehl Date: Wed, 29 Mar 2023 17:53:06 -0500 Subject: [PATCH] Try inline import in tests to avoid disrupting fixture monkeypatching --- tests/test_installer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_installer.py b/tests/test_installer.py index 729d64f..138ede1 100644 --- a/tests/test_installer.py +++ b/tests/test_installer.py @@ -8,7 +8,6 @@ from poetry.factory import Factory from .fixtures import mock_poetry_factory from .fixtures import mock_venv -from tox_poetry_installer import _poetry from tox_poetry_installer import installer from tox_poetry_installer import utilities @@ -68,6 +67,8 @@ def test_propagates_exceptions_during_installation( ): # Assert that an exception which occurs during installation is properly raised. # Regression test for https://github.com/enpaul/tox-poetry-installer/issues/86 + from tox_poetry_installer import _poetry + poetry = Factory().create_poetry(None) packages: utilities.PackageMap = { item.name: item for item in poetry.locker.locked_repository().packages