✔ 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:
Sebastián Ramírez
2020-07-10 11:08:19 +02:00
committed by GitHub
parent 250fa519f9
commit 600f15faa0
17 changed files with 21 additions and 35 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)