|
6 | 6 | import unittest |
7 | 7 | from typing import Optional |
8 | 8 |
|
9 | | -import pytest |
10 | 9 | from sqlalchemy import create_engine |
11 | 10 | from sqlmodel import Field, Session, SQLModel, select |
12 | 11 |
|
@@ -180,19 +179,15 @@ class HeroWithTeam(SQLModel, table=True): |
180 | 179 | Team.metadata.drop_all(self.engine) |
181 | 180 |
|
182 | 181 |
|
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""" |
185 | 184 |
|
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 |
191 | 188 |
|
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:") |
196 | 191 |
|
197 | 192 | # Create all tables |
198 | 193 | SQLModel.metadata.create_all(engine) |
|
0 commit comments