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/decorators/test_python_virtualenv.py
import funcsigs  
        with self.dag:
            ret = f()
        ret.operator.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
    def test_with_requirements_pinned(self):
        @task.virtualenv(
            system_site_packages=False,
            requirements=['funcsigs==0.4'],
            python_version=PYTHON_VERSION,
            use_dill=True,
        )
        def f():
            import funcsigs
            if funcsigs.__version__ != '0.4':
                raise Exception
        with self.dag:
            ret = f()
        ret.operator.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
    def test_unpinned_requirements(self):
        @task.virtualenv(
            system_site_packages=False,
            requirements=['funcsigs', 'dill'],
            python_version=PYTHON_VERSION,
            use_dill=True,
        )
        def f():