mirror of
https://github.com/fastapi/fastapi.git
synced 2026-04-14 03:50:33 -04:00
✔ Improve support for tests in editor (#1699)
* ♻️ Remove required extra steps to test in editor * 🎨 Format lint script * 📝 Remove obsolete extra steps required to test in editor from docs * 🐛 Fix coverage
This commit is contained in:
committed by
GitHub
parent
250fa519f9
commit
600f15faa0
@@ -288,7 +288,7 @@ def client():
|
||||
if test_db.is_file(): # pragma: nocover
|
||||
test_db.unlink()
|
||||
# Import while creating the client to create the DB after starting the test session
|
||||
from sql_databases.sql_app import main
|
||||
from docs_src.sql_databases.sql_app import main
|
||||
|
||||
# Ensure import side effects are re-executed
|
||||
importlib.reload(main)
|
||||
|
||||
@@ -288,7 +288,7 @@ def client():
|
||||
if test_db.is_file(): # pragma: nocover
|
||||
test_db.unlink()
|
||||
# Import while creating the client to create the DB after starting the test session
|
||||
from sql_databases.sql_app import alt_main
|
||||
from docs_src.sql_databases.sql_app import alt_main
|
||||
|
||||
# Ensure import side effects are re-executed
|
||||
importlib.reload(alt_main)
|
||||
|
||||
@@ -7,7 +7,7 @@ def test_testing_dbs():
|
||||
if test_db.is_file(): # pragma: nocover
|
||||
test_db.unlink()
|
||||
# Import while creating the client to create the DB after starting the test session
|
||||
from sql_databases.sql_app.tests import test_sql_app
|
||||
from docs_src.sql_databases.sql_app.tests import test_sql_app
|
||||
|
||||
# Ensure import side effects are re-executed
|
||||
importlib.reload(test_sql_app)
|
||||
|
||||
Reference in New Issue
Block a user