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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]