onlyarnav commented on code in PR #70130:
URL: https://github.com/apache/airflow/pull/70130#discussion_r3615222498
##########
providers/databricks/tests/conftest.py:
##########
@@ -16,4 +16,18 @@
# under the License.
from __future__ import annotations
+import os
+import sys
+
+if os.name == "nt":
+ from types import ModuleType
+
+ fcntl_mock = ModuleType("fcntl")
+ fcntl_mock.LOCK_SH = 1
+ fcntl_mock.LOCK_EX = 2
+ fcntl_mock.LOCK_NB = 4
+ fcntl_mock.LOCK_UN = 8
+ fcntl_mock.flock = lambda fd, operation: None
+ sys.modules["fcntl"] = fcntl_mock
Review Comment:
Since fcntl is a POSIX-only module, airflow 3.0+ imports it during test
execution setup, which crashes test collection on Windows. This mock was added
so the test suite could be run and verified locally on a Windows machine. It
was added by Antigravity, but I have reverted it.
--
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]