Skip to content

Commit

Permalink
Improve Astro CLI DAGs test so running hatch test-cov locally doesn't…
Browse files Browse the repository at this point in the history
… fail (#97)

```
FAILED dev/tests/dags/test_dag_example.py::test_dag_retries[dags/ray_single_operator.py] - TypeError: '>=' not supported between instances of 'NoneType' and 'int'
FAILED dev/tests/dags/test_dag_example.py::test_dag_retries[dags/ray_taskflow_example.py] - TypeError: '>=' not supported between instances of 'NoneType' and 'int'
FAILED dev/tests/dags/test_dag_example.py::test_dag_retries[dags/setup-teardown.py] - TypeError: '>=' not supported between instances of 'NoneType' and 'int'
FAILED dev/tests/dags/test_dag_example.py::test_dag_retries[dags/ray_taskflow_example_existing_cluster.py] - TypeError: '>=' not supported between instances of 'NoneType' and 'int'
```
  • Loading branch information
tatiana authored Nov 28, 2024
1 parent be298c8 commit ae1adad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dev/tests/dags/test_dag_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ def test_dag_retries(dag_id, dag, fileloc):
"""
test if a DAG has retries set
"""
assert dag.default_args.get("retries", None) >= 2, f"{dag_id} in {fileloc} must have task retries >= 2."
assert dag.default_args.get("retries", 2) >= 2, f"{dag_id} in {fileloc} must have task retries >= 2."

0 comments on commit ae1adad

Please sign in to comment.