Skip to content

Commit

Permalink
Fix MySQL and remove MyPy from PyPy job
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien-berchet committed Nov 5, 2024
1 parent 8a3b4d6 commit 4bb76ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions tests/test_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -1206,12 +1206,14 @@ class GeometryWkt(Geometry):
as_binary = "ST_AsText"
ElementType = WKTElement

dialects_with_srid = ["geopackage", "mysql", "mariadb"]

# Define the table
cols = [
Column("id", Integer, primary_key=True),
]
cols.append(Column("geom_with_srid", GeometryWkt(geometry_type="LINESTRING", srid=4326)))
if dialect_name not in ["geopackage", "mariadb"]:
if dialect_name not in dialects_with_srid:
cols.append(Column("geom", GeometryWkt(geometry_type="LINESTRING")))
t = Table("use_wkt", MetaData(), *cols)

Expand All @@ -1229,7 +1231,7 @@ class GeometryWkt(Geometry):
from_shape(LineString([[0, 0], [4, 4]]), srid=4326),
]
]
if dialect_name not in ["geopackage", "mariadb"]:
if dialect_name not in dialects_with_srid:
for i, v in zip(
inserted_values,
[
Expand Down
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ setenv=
COVERAGE_FILE = {env:COVERAGE_FILE:.coverage-{envname}}
EXPECTED_COV = 93
pypy3: EXPECTED_COV = 85
sqla14: PYTEST_ADDOPTS = {env:PYTEST_ADDOPTS:} --mypy-ignore-missing-imports
sqla14: PYTEST_ADDOPTS = {env:PYTEST_ADDOPTS:} --mypy --mypy-ignore-missing-imports
sqlalatest: PYTEST_ADDOPTS = {env:PYTEST_ADDOPTS:} --mypy
pypy3: PYTEST_ADDOPTS = {env:PYTEST_ADDOPTS:}
deps=
sqla14: SQLAlchemy==1.4.*
sqlalatest: SQLAlchemy
Expand All @@ -54,7 +56,6 @@ commands=
--self-contained-html \
--durations 10 \
--durations-min=2.0 \
--mypy \
{posargs}

[testenv:coverage]
Expand Down

0 comments on commit 4bb76ba

Please sign in to comment.