john-bodley commented on a change in pull request #14366:
URL: https://github.com/apache/superset/pull/14366#discussion_r621711366



##########
File path: tests/conftest.py
##########
@@ -18,18 +18,27 @@
 from typing import Any
 
 import pytest
+from flask import current_app, Flask
 from sqlalchemy.engine import Engine
 
 from tests.test_app import app
-
 from superset import db
+from superset.app import create_app
 from superset.utils.core import get_example_database, json_dumps_w_dates
 
 
 CTAS_SCHEMA_NAME = "sqllab_test_db"
 ADMIN_SCHEMA_NAME = "admin_database"
 
 
+# TODO(john-bodleY): The `tests.test_app.app` logic is atypical and extremely 
brittle
+# and thus should be deprecated in favor of a more typical Flask testing model 
utilizing
+# a function scoped app to aid with idempotent testing.
[email protected]

Review comment:
       @villebro the inclusion of this fixture to help ensure idempotent 
testing illustrates just how fragile our testing configuration is, i.e., using 
the fixture is insolation works but causes other tests to fail when testing the 
entire suite of tests.
   
   I think there  needs to be a saner mechanism for creating an application at 
the function (default) scope whilst leveraging the examples database allowing 
for simpler more robust idempotent testing.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to