Skip to content

Commit 8c9e668

Browse files
committed
Enable more tests
1 parent e3e4a35 commit 8c9e668

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

cockroachdb/sqlalchemy/dialect.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@ def initialize(self, connection):
121121
sversion = connection.scalar("select version()")
122122
self._is_v2plus = " v1." not in sversion
123123
self._is_v21plus = self._is_v2plus and (" v2.0." not in sversion)
124-
self._is_v201plus = self._is_v21plus and (" v19." not in sversion)
124+
self._is_v191plus = self._is_v21plus and (" v2.1." not in sversion)
125+
self._is_v192plus = self._is_v191plus and (" v19.1." not in sversion)
126+
self._is_v201plus = self._is_v192plus and (" v19.2." not in sversion)
127+
self._is_v202plus = self._is_v201plus and (" v20.1." not in sversion)
125128
self._has_native_json = self._is_v2plus
126129
self._has_native_jsonb = self._is_v2plus
127130
self._supports_savepoints = self._is_v201plus

cockroachdb/sqlalchemy/test_requirements.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class Requirements(SuiteRequirements):
2222
"v1.x does not support TIME.")
2323
time_microseconds = exclusions.skip_if(lambda config: not config.db.dialect._is_v2plus,
2424
"v1.x does not support TIME.")
25+
timestamp_microseconds = exclusions.open()
2526
server_side_cursors = exclusions.closed()
2627
cross_schema_fk_reflection = exclusions.closed()
2728

@@ -71,6 +72,17 @@ class Requirements(SuiteRequirements):
7172
update_from = exclusions.open()
7273
mod_operator_as_percent_sign = exclusions.open()
7374
foreign_key_constraint_reflection = exclusions.open()
75+
ctes = exclusions.skip_if(lambda config: not config.db.dialect._is_v201plus,
76+
"versions before 20.x do not fully support CTEs.")
77+
ctes_with_update_delete = \
78+
exclusions.skip_if(lambda config: not config.db.dialect._is_v201plus,
79+
"versions before 20.x do not fully support CTEs.")
80+
ctes_on_dml = exclusions.skip_if(lambda config: not config.db.dialect._is_v201plus,
81+
"versions before 20.x do not fully support CTEs.")
82+
isolation_level = exclusions.open()
83+
json_type = exclusions.skip_if(lambda config: not config.db.dialect._is_v192plus,
84+
"versions before 19.2.x do not pass the JSON tests.")
85+
tuple_in = exclusions.open()
7486
# The psycopg driver doesn't support these.
7587
percent_schema_names = exclusions.closed()
7688
order_by_label_with_expression = exclusions.open()

tox.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[tox]
22
# We do not currently test with pypy because psycopg2 does not work there.
33
envlist =
4-
py27
54
py37
65
lint
76

0 commit comments

Comments
 (0)