Skip to content

Commit 42afadc

Browse files
authored
chore: fix build and lint errors (#351)
* chore: fix build and lint errors * test: skip another test using auto increment * test: skip isolation level test
1 parent d2222d5 commit 42afadc

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

google/cloud/sqlalchemy_spanner/sqlalchemy_spanner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def render_literal_value(self, value, type_):
304304
generate a SQL statement.
305305
"""
306306
raw = ["\\", "'", '"', "\n", "\t", "\r"]
307-
if type(value) == str and any(single in value for single in raw):
307+
if isinstance(value, str) and any(single in value for single in raw):
308308
value = 'r"""{}"""'.format(value)
309309
return value
310310
else:

test/test_suite_20.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,6 +2111,10 @@ def test_empty_insert_multiple(self):
21112111
def test_insert_from_select_autoinc(self):
21122112
pass
21132113

2114+
@pytest.mark.skip("Spanner does not support auto increment")
2115+
def test_no_results_for_non_returning_insert(self, connection, style, executemany):
2116+
pass
2117+
21142118
def test_autoclose_on_insert(self):
21152119
"""
21162120
SPANNER OVERRIDE:
@@ -2495,6 +2499,17 @@ class IsOrIsNotDistinctFromTest(_IsOrIsNotDistinctFromTest):
24952499
pass
24962500

24972501

2502+
@pytest.mark.skip("Spanner doesn't bizarre characters in foreign key names")
2503+
class BizarroCharacterFKResolutionTest(fixtures.TestBase):
2504+
pass
2505+
2506+
2507+
class IsolationLevelTest(fixtures.TestBase):
2508+
@pytest.mark.skip("Cloud Spanner does not support different isolation levels")
2509+
def test_dialect_user_setting_is_restored(self, testing_engine):
2510+
pass
2511+
2512+
24982513
class OrderByLabelTest(_OrderByLabelTest):
24992514
@pytest.mark.skip(
25002515
"Spanner requires an alias for the GROUP BY list when specifying derived "

0 commit comments

Comments
 (0)