kstrz commented on a change in pull request #12762:
URL: https://github.com/apache/superset/pull/12762#discussion_r566709474
##########
File path: tests/charts/api_tests.py
##########
@@ -686,13 +793,19 @@ def test_update_chart_validate_datasource(self):
db.session.delete(chart)
Review comment:
Do you mean `finally` in `try` block? I think `tearDown` would be a a
bit hacky because it is test specific object. It is more general problem. There
are many tests that create some specific objects and delete them after
assertion. I wonder how should we refactor them. Creating tests specific
fixtures or context managers would result in many additional lines of code and
make tests less readable. On the other hand if any test fails that means
something should be fixed and next failures caused by side effects of the
failed test may be not so important.
----------------------------------------------------------------
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]