Skip to content

Commit 47ccba8

Browse files
committed
Chore: Fix tests on Python 3.9 and SQLAlchemy 1.3, by skipping them
We don't know which circumstances cause this problem. SQLAlchemy 1.3 is EOL anyway, so we don't care too much. sqlalchemy.exc.InvalidRequestError: When initializing mapper mapped class RootStore->root, expression 'ItemStore' failed to locate a name ('ItemStore'). If this is a class name, consider adding this relationship() to the <class 'tests.compiler_test.SqlAlchemyDDLCompilerTest.test_ddl_with_foreign_keys.<locals>.RootStore'> class after both dependent classes have been defined.
1 parent da977d9 commit 47ccba8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/compiler_test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# However, if you have executed another commercial license agreement
1919
# with Crate these terms will supersede the license and you may use the
2020
# software solely pursuant to the terms of the relevant commercial agreement.
21+
import sys
2122
import warnings
2223
from textwrap import dedent
2324
from unittest import mock, skipIf, TestCase
@@ -288,6 +289,8 @@ def test_for_update(self):
288289
FakeCursor = MagicMock(name='FakeCursor', spec=Cursor)
289290

290291

292+
@skipIf(SA_VERSION < SA_1_4 and (3, 9) <= sys.version_info < (3, 10),
293+
"SQLAlchemy 1.3 has problems with these test cases on Python 3.9")
291294
class CompilerTestCase(TestCase):
292295
"""
293296
A base class for providing mocking infrastructure to validate the DDL compiler.

0 commit comments

Comments
 (0)