airflow
airflow copied to clipboard
[Experiment] Use `importlib` import mode for `pytest`
Just an experiment whether or not airflow tests could use importlib mode instead of prepend
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.
interesting . I had no idea pytest is doing that.
interesting . I had no idea pytest is doing that.
I've found myself it about week ago when try to find how to solve one issue.
🤔 🤔 🤔
# Provide existent file path,
# so loaded YAML file content should be used to call deserialize_model_dict(), rather than None.
path = sys.path[0] + "/tests/providers/cncf/kubernetes/pod.yaml"
> with open(path) as stream:
E FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/bin/tests/providers/cncf/kubernetes/pod.yaml'
path = sys.path[0] + "/tests/providers/cncf/kubernetes/pod.yaml"
Yeah. Someone took advantage of assuming sys.path will be modified :)
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.