@@ -738,7 +738,7 @@ def task_example() -> Annotated[Dict[str, str], PythonNode(name="result")]:
738
738
739
739
740
740
@pytest .mark .end_to_end ()
741
- def test_more_nested_pytree_and_python_node_as_return (runner , tmp_path ):
741
+ def test_more_nested_pytree_and_python_node_as_return_with_names (runner , tmp_path ):
742
742
source = """
743
743
from pathlib import Path
744
744
from typing import Any
@@ -758,6 +758,39 @@ def task_example() -> Annotated[Dict[str, str], nodes]:
758
758
tmp_path .joinpath ("task_module.py" ).write_text (textwrap .dedent (source ))
759
759
result = runner .invoke (cli , [tmp_path .as_posix ()])
760
760
assert result .exit_code == ExitCode .OK
761
+ assert "1 Succeeded" in result .output
762
+
763
+ result = runner .invoke (cli , [tmp_path .as_posix ()])
764
+ assert result .exit_code == ExitCode .OK
765
+ assert "1 Skipped" in result .output
766
+
767
+
768
+ @pytest .mark .end_to_end ()
769
+ def test_more_nested_pytree_and_python_node_as_return (runner , tmp_path ):
770
+ source = """
771
+ from pathlib import Path
772
+ from typing import Any
773
+ from typing_extensions import Annotated
774
+ from pytask import PythonNode
775
+ from typing import Dict
776
+
777
+ nodes = [
778
+ PythonNode(),
779
+ (PythonNode(), PythonNode()),
780
+ PythonNode()
781
+ ]
782
+
783
+ def task_example() -> Annotated[Dict[str, str], nodes]:
784
+ return [{"first": "a", "second": "b"}, (1, 2), 1]
785
+ """
786
+ tmp_path .joinpath ("task_module.py" ).write_text (textwrap .dedent (source ))
787
+ result = runner .invoke (cli , [tmp_path .as_posix ()])
788
+ assert result .exit_code == ExitCode .OK
789
+ assert "1 Succeeded" in result .output
790
+
791
+ result = runner .invoke (cli , [tmp_path .as_posix ()])
792
+ assert result .exit_code == ExitCode .OK
793
+ assert "1 Skipped" in result .output
761
794
762
795
763
796
@pytest .mark .end_to_end ()
0 commit comments