From 135a8aaba2c6941460c7f45aa1a55c8f6b9eb43d Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Sun, 12 Dec 2021 14:41:56 +0100 Subject: [PATCH] Ignore ephemeral classes in test_all_present() In some circumstances, ephemeral class objects that are created within the scope of a test method don't seem to be garbage collected directly on exit. Filter out classes created outside of the sqlalchemy package. Fixes: #7450 Signed-off-by: Nils Philippsen --- test/sql/test_compare.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/sql/test_compare.py b/test/sql/test_compare.py index ca1eff62b4..ca47f475d3 100644 --- a/test/sql/test_compare.py +++ b/test/sql/test_compare.py @@ -1366,6 +1366,7 @@ class CompareAndCopyTest(CoreFixtures, fixtures.TestBase): or "inherit_cache" not in cls.__dict__ ) and not issubclass(cls, (Annotated)) + and cls.__module__.startswith("sqlalchemy.") and "orm" not in cls.__module__ and "compiler" not in cls.__module__ and "crud" not in cls.__module__ -- 2.47.2