Skip to content

Commit

Permalink
Update TestExternalPythonDecorator tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sumeshpremraj committed Jul 17, 2023
1 parent 7fa00e9 commit dee7249
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/decorators/test_external_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,18 @@ def venv_python_with_dill():

class TestExternalPythonDecorator:
def test_with_dill_works(self, dag_maker, venv_python_with_dill):
@task.external_python(python=venv_python_with_dill, use_dill=True)
@task.external_python(python=venv_python_with_dill, use_cloudpickle=True)
def f():
"""Import dill to double-check it is installed ."""
import dill # noqa: F401
"""Import cloudpickle to double-check it is installed ."""
import cloudpickle # noqa: F401

with dag_maker():
ret = f()

ret.operator.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)

def test_no_dill_installed_raises_exception_when_use_dill(self, dag_maker, venv_python):
@task.external_python(python=venv_python, use_dill=True)
def test_no_cloudpickle_installed_raises_exception_when_use_cloudpickle(self, dag_maker, venv_python):
@task.external_python(python=venv_python, use_cloudpickle=True)
def f():
pass

Expand Down

0 comments on commit dee7249

Please sign in to comment.