villebro commented on a change in pull request #11193:
URL: 
https://github.com/apache/incubator-superset/pull/11193#discussion_r503163815



##########
File path: superset/utils/core.py
##########
@@ -1553,3 +1553,7 @@ class AdhocMetricExpressionType(str, Enum):
 class RowLevelSecurityFilterType(str, Enum):
     REGULAR = "Regular"
     BASE = "Base"
+
+
+def is_test() -> bool:
+    return "SUPERSET_TESTENV" in os.environ

Review comment:
       Here it might be worth considering using `strtobool`, which will parse 
the string value for known string representations of boolean values so the env 
variable can also explicitly be set to `True`:
   
   ```python
   from distutils.util import strtobool 
   
   strtobool(os.environ.get("SUPERSET_TESTENV", "false"))
   ```
   




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