uranusjr commented on code in PR #40069:
URL: https://github.com/apache/airflow/pull/40069#discussion_r1630854677


##########
tests/core/test_settings.py:
##########
@@ -230,12 +230,22 @@ def 
test_uses_updated_session_timeout_config_by_default(self):
         assert session_lifetime_config == default_timeout_minutes
 
 
+_local_db_path_error = pytest.raises(AirflowConfigException, match=r"Cannot 
use relative path:")
+
+
 @pytest.mark.parametrize(
     ["value", "expectation"],
     [
+        ("sqlite:///./relative_path.db", _local_db_path_error),
+        ("sqlite:///relative/path.db", _local_db_path_error),
+        # Should raise an exception based on OS
+        (
+            "sqlite:///C:/path/to/db",
+            contextlib.nullcontext() if sys.platform == "win32" else 
_local_db_path_error,

Review Comment:
   Better to not run this on Windows at all with `pytest.param(..., mark=...)`.



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

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to