Skip to content

Commit 43c75bf

Browse files
author
Eugene Shershen
committed
codeql-analysis.yml
1 parent 282cc68 commit 43c75bf

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

tests/test_sqlmodel_compatibility.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import unittest
77
from typing import Optional
88

9-
import pytest
109
from sqlalchemy import create_engine
1110
from sqlmodel import Field, Session, SQLModel, select
1211

@@ -180,19 +179,15 @@ class HeroWithTeam(SQLModel, table=True):
180179
Team.metadata.drop_all(self.engine)
181180

182181

183-
class TestPsqlpyDialectWithSQLModel(unittest.TestCase):
184-
"""Test cases for psqlpy dialect with SQLModel"""
182+
class TestSQLiteDialectWithSQLModel(unittest.TestCase):
183+
"""Test cases for SQLite dialect with SQLModel"""
185184

186-
@pytest.mark.skip("Requires a running PostgreSQL server")
187-
def test_psqlpy_dialect_with_sqlmodel(self):
188-
"""Test using psqlpy dialect with SQLModel"""
189-
# This test requires a running PostgreSQL server
190-
# It's marked as skipped by default
185+
def test_sqlite_dialect_with_sqlmodel(self):
186+
"""Test using SQLite dialect with SQLModel"""
187+
# This test uses SQLite in-memory database for testing
191188

192-
# Create engine with psqlpy dialect
193-
engine = create_engine(
194-
"postgresql+psqlpy://user:password@localhost/dbname"
195-
)
189+
# Create engine with SQLite dialect
190+
engine = create_engine("sqlite:///:memory:")
196191

197192
# Create all tables
198193
SQLModel.metadata.create_all(engine)

0 commit comments

Comments
 (0)