]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Ignore ephemeral classes in test_all_present() 7451/head
authorNils Philippsen <nils@tiptoe.de>
Sun, 12 Dec 2021 13:41:56 +0000 (14:41 +0100)
committerNils Philippsen <nils@tiptoe.de>
Sun, 12 Dec 2021 23:33:44 +0000 (00:33 +0100)
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 <nils@tiptoe.de>
test/sql/test_compare.py

index ca1eff62b4bce30d7b1e7a7b86a48fa82b969b12..ca47f475d35d0ac4c7e4ff5996b811e2ccae3b2c 100644 (file)
@@ -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__