From 86cda5940ecd9f2d702a9287387b835de31a702b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Fri, 23 Aug 2024 10:59:44 +0200 Subject: [PATCH] tests: Clean up tests --- tests/test_loader.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/tests/test_loader.py b/tests/test_loader.py index 5453fa3b..ccd2930c 100644 --- a/tests/test_loader.py +++ b/tests/test_loader.py @@ -489,24 +489,3 @@ def test_not_calling_package_loaded_hook_on_something_else_than_package() -> Non alias: Alias = loader.load("pkg.L") # type: ignore[assignment] assert alias.is_alias assert not alias.resolved - - -@pytest.mark.parametrize("dynamic", [True, False]) -def test_warning_on_objects_from_non_submodules_being_exported( - caplog: pytest.LogCaptureFixture, - dynamic: bool, -) -> None: - """Warn when objects from non-submodules are exported.""" - temporary_package = temporary_inspected_package if dynamic else temporary_visited_package - with caplog.at_level(logging.DEBUG, logger="griffe"), temporary_package( - "pkg", - { - "__init__.py": "from typing import List\nfrom pkg import moda, modb\n__all__ = ['List']", - "moda.py": "class Thing: ...", - "modb.py": "from pkg.moda import Thing\n\n__all__ = ['Thing']", - }, - resolve_aliases=True, - ): - messages = [record.message for record in caplog.records] - assert any("Name `List` exported by module" in msg for msg in messages) - assert any("Name `Thing` exported by module" in msg for msg in messages)