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
def f(a):
            return a
        self._run_as_operator(f, system_site_packages=False, use_dill=False, op_args=[4])
    def test_string_args(self):
        def f():
            global virtualenv_string_args
            print(virtualenv_string_args)
            if virtualenv_string_args[0] != virtualenv_string_args[2]:
                raise Exception
        self._run_as_operator(f, string_args=[1, 2, 1])
    def test_with_args(self):
        def f(a, b, c=False, d=False):
            if a == 0 and b == 1 and c and not d:
                return True
            else:
                raise Exception
        self._run_as_operator(f, op_args=[0, 1], op_kwargs={'c': True})
    def test_return_none(self):
        def f():
            return None
        task = self._run_as_operator(f)
        assert task.execute_callable() is None
    def test_return_false(self):