From: Nils Philippsen Date: Sun, 12 Dec 2021 13:41:56 +0000 (+0100) Subject: Ignore ephemeral classes in test_all_present() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=135a8aaba2c6941460c7f45aa1a55c8f6b9eb43d;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git 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 --- 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__