From bf18863a1907964bb43d7ddc20c9841cbe3f6e06 Mon Sep 17 00:00:00 2001 From: Llewellyn Falco Date: Sun, 7 Jul 2024 19:13:46 +0000 Subject: [PATCH] - F Moved pytest into integrations/pytest Co-Authored-By: Matt Anderson Co-Authored-By: Joss Hufnagel <43077216+blade290@users.noreply.github.com> Co-Authored-By: Susan Fung <38925660+susanfung@users.noreply.github.com> --- approvaltests/integrations/__init__.py | 0 approvaltests/integrations/pytest/__init__.py | 1 + approvaltests/{ => integrations}/pytest/py_test_namer.py | 0 approvaltests/{ => integrations}/pytest/pytest_config.py | 0 approvaltests/{ => integrations}/pytest/pytest_plugin.py | 0 approvaltests/namer/stack_frame_namer.py | 2 +- approvaltests/pytest/__init__.py | 1 - setup_utils.py | 2 +- tests/conftest.py | 2 +- tests/integrations/pytest/test_namer.py | 2 +- 10 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 approvaltests/integrations/__init__.py create mode 100644 approvaltests/integrations/pytest/__init__.py rename approvaltests/{ => integrations}/pytest/py_test_namer.py (100%) rename approvaltests/{ => integrations}/pytest/pytest_config.py (100%) rename approvaltests/{ => integrations}/pytest/pytest_plugin.py (100%) delete mode 100644 approvaltests/pytest/__init__.py diff --git a/approvaltests/integrations/__init__.py b/approvaltests/integrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/approvaltests/integrations/pytest/__init__.py b/approvaltests/integrations/pytest/__init__.py new file mode 100644 index 00000000..cc500ad8 --- /dev/null +++ b/approvaltests/integrations/pytest/__init__.py @@ -0,0 +1 @@ +"""Approvaltests.integrations.pytest module.""" diff --git a/approvaltests/pytest/py_test_namer.py b/approvaltests/integrations/pytest/py_test_namer.py similarity index 100% rename from approvaltests/pytest/py_test_namer.py rename to approvaltests/integrations/pytest/py_test_namer.py diff --git a/approvaltests/pytest/pytest_config.py b/approvaltests/integrations/pytest/pytest_config.py similarity index 100% rename from approvaltests/pytest/pytest_config.py rename to approvaltests/integrations/pytest/pytest_config.py diff --git a/approvaltests/pytest/pytest_plugin.py b/approvaltests/integrations/pytest/pytest_plugin.py similarity index 100% rename from approvaltests/pytest/pytest_plugin.py rename to approvaltests/integrations/pytest/pytest_plugin.py diff --git a/approvaltests/namer/stack_frame_namer.py b/approvaltests/namer/stack_frame_namer.py index 7f6dd794..8e74b034 100644 --- a/approvaltests/namer/stack_frame_namer.py +++ b/approvaltests/namer/stack_frame_namer.py @@ -7,7 +7,7 @@ from approvaltests.namer.namer_base import NamerBase from approvaltests.approval_exception import FrameNotFound from approval_utilities.utilities.stack_frame_utilities import get_class_name_for_frame -from approvaltests.pytest.pytest_config import PytestConfig +from approvaltests.integrations.pytest.pytest_config import PytestConfig class StackFrameNamer(NamerBase): diff --git a/approvaltests/pytest/__init__.py b/approvaltests/pytest/__init__.py deleted file mode 100644 index aa3a4652..00000000 --- a/approvaltests/pytest/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Approvaltests.pytest module.""" diff --git a/setup_utils.py b/setup_utils.py index c287e09e..6f281517 100644 --- a/setup_utils.py +++ b/setup_utils.py @@ -33,7 +33,7 @@ def do_the_setup(package_name, package_description, required, extra_requires): package_data={"approvaltests": ["reporters/reporters.json"]}, entry_points={ "pytest11": [ - "approvaltests_pytest = approvaltests.pytest.pytest_plugin", + "approvaltests_pytest = approvaltests.integrations.pytest.pytest_plugin", ], }, install_requires=required, diff --git a/tests/conftest.py b/tests/conftest.py index f60e39a7..3c0b5ebf 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,7 +3,7 @@ import pytest # The next line registers the plugin -from approvaltests.pytest.pytest_plugin import pytest_configure +from approvaltests.integrations.pytest.pytest_plugin import pytest_configure # begin-snippet: conftest_pytest_session_scoped diff --git a/tests/integrations/pytest/test_namer.py b/tests/integrations/pytest/test_namer.py index b1c1a01b..dc17240c 100644 --- a/tests/integrations/pytest/test_namer.py +++ b/tests/integrations/pytest/test_namer.py @@ -1,7 +1,7 @@ import os from approvaltests.approvals import get_default_namer, verify -from approvaltests.pytest.py_test_namer import PyTestNamer +from approvaltests.integrations.pytest.py_test_namer import PyTestNamer def test_basic_approval():