Currently the operator allows to set requirement as list that needs to be hard coded.
It would be nice if airflow can support reading from file directly (something similar to how operators read sql file)
tests/operators/test_python.py
"""Test that PythonVirtualenvOperator are deep-copyable."""
        def f():
            return 1
        task = PythonVirtualenvOperator(
            python_callable=f,
            task_id='task',
            dag=self.dag,
        )
        copy.deepcopy(task)
DEFAULT_ARGS = {
    "owner": "test",
    "depends_on_past": True,
    "start_date": days_ago(1),
    "end_date": datetime.today(),
    "schedule_interval": "@once",
    "retries": 1,
    "retry_delay": timedelta(minutes=1),
}
class TestCurrentContext:
    def test_current_context_no_context_raise(self):
        with pytest.raises(AirflowException):
            get_current_context()
    def test_current_context_roundtrip(self):
        example_context = {"Hello": "World"}
        with set_current_context(example_context):
            assert get_current_context() == example_context
    def test_context_removed_after_exit(self):