commit:     7ac22a7920d22174c59c8e8ca203655d73ff4509
Author:     Brian Harring <ferringb <AT> gmail <DOT> com>
AuthorDate: Sun Dec 14 16:24:22 2025 +0000
Commit:     Brian Harring <ferringb <AT> gmail <DOT> com>
CommitDate: Mon Dec 15 12:42:10 2025 +0000
URL:        
https://gitweb.gentoo.org/proj/pkgcore/snakeoil.git/commit/?id=7ac22a79

chore: suppress deprecation notices for test_all imports

Signed-off-by: Brian Harring <ferringb <AT> gmail.com>

 src/snakeoil/test/code_quality.py | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/snakeoil/test/code_quality.py 
b/src/snakeoil/test/code_quality.py
index 6088dbe..7b5a872 100644
--- a/src/snakeoil/test/code_quality.py
+++ b/src/snakeoil/test/code_quality.py
@@ -105,13 +105,14 @@ class Modules(NamespaceCollector, still_abstract=True):
                 assert hasattr(module, "__all__"), "__all__ is missing but 
should exist"
 
     def test_valid__all__(self, subtests):
-        for module in self.collect_modules():
-            with subtests.test(module=module.__name__):
-                if attrs := getattr(module, "__all__", ()):
-                    missing = {attr for attr in attrs if not hasattr(module, 
attr)}
-                    assert not missing, (
-                        f"__all__ refers to exports that don't exist: 
{missing!r}"
-                    )
+        with deprecation.suppress_deprecations():
+            for module in self.collect_modules():
+                with subtests.test(module=module.__name__):
+                    if attrs := getattr(module, "__all__", ()):
+                        missing = {attr for attr in attrs if not 
hasattr(module, attr)}
+                        assert not missing, (
+                            f"__all__ refers to exports that don't exist: 
{missing!r}"
+                        )
 
 
 class ExpiredDeprecations(NamespaceCollector, still_abstract=True):

Reply via email to