drobert-bfm opened a new issue, #34558:
URL: https://github.com/apache/airflow/issues/34558
### Apache Airflow version
2.7.1
### What happened
Attempting to test DAG sanity by running dag.test():
if __name__ == '__main__':
test_http_sensor().test()
python my_sensor_dag.py
I receive the following error:
ImportError: cannot import name 'Dataset' from partially initialized module
'airflow'
### What you think should happen instead
According to what I can figure out in the documentation, it should be
possible to run DAG.test() outside the airflow scheduler/executor in order to
validate a DAG.
### How to reproduce
1. Activate .venv which contains Airflow execution
2. create dag with if __name__ == '__main__' as shown above
3. run the code: python <name of dag file>.py
### Operating System
CentOS 8 Stream
### Versions of Apache Airflow Providers
apache-airflow-providers-common-sql==1.7.1
apache-airflow-providers-ftp==3.5.1
apache-airflow-providers-http==4.5.1
apache-airflow-providers-imap==3.3.1
apache-airflow-providers-mysql==5.3.1
apache-airflow-providers-sqlite==3.4.3
### Deployment
Virtualenv installation
### Deployment details
_No response_
### Anything else
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]