Coverage for tests/test_tutorial/test_connect/test_create_connected_tables/test_tutorial001_py310.py: 100%
13 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 00:02 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 00:02 +0000
1from sqlalchemy import inspect 1idefgh
2from sqlalchemy.engine.reflection import Inspector 1idefgh
3from sqlmodel import create_engine 1idefgh
5from ....conftest import needs_py310 1idefgh
8@needs_py310 1idefgh
9def test_tutorial001(clear_sqlmodel): 1defgh
10 from docs_src.tutorial.connect.create_tables import tutorial001_py310 as mod 1abc
12 mod.sqlite_url = "sqlite://" 1abc
13 mod.engine = create_engine(mod.sqlite_url) 1abc
14 mod.main() 1abc
15 insp: Inspector = inspect(mod.engine) 1abc
16 assert insp.has_table(str(mod.Hero.__tablename__)) 1abc
17 assert insp.has_table(str(mod.Team.__tablename__)) 1abc