11import os
22import shutil
33from pathlib import Path
4- from typing import TYPE_CHECKING
54
6- from . util import get_data
5+ import pytest
76
8- if TYPE_CHECKING :
9- from _pytest .pytester import Pytester
7+ from .util import get_data
108
119
1210def _load_v1_0_dir (path : Path ) -> None :
@@ -20,7 +18,7 @@ def _load_v1_0_dir(path: Path) -> None:
2018 shutil .copy (get_data ("tests/test-data/v1.0/args.py" ), inner_dir )
2119
2220
23- def test_include (pytester : " Pytester" ) -> None :
21+ def test_include (pytester : pytest . Pytester ) -> None :
2422 """Test the pytest plugin using cwltool as cwl-runner."""
2523 path = pytester .copy_example ("conformance_test_v1.0.cwltest.yml" )
2624 shutil .copy (
@@ -36,7 +34,7 @@ def test_include(pytester: "Pytester") -> None:
3634 result .assert_outcomes (passed = 1 , skipped = 1 )
3735
3836
39- def test_exclude (pytester : " Pytester" ) -> None :
37+ def test_exclude (pytester : pytest . Pytester ) -> None :
4038 """Test the pytest plugin using cwltool as cwl-runner."""
4139 path = pytester .copy_example ("conformance_test_v1.0.cwltest.yml" )
4240 shutil .copy (
@@ -52,7 +50,7 @@ def test_exclude(pytester: "Pytester") -> None:
5250 result .assert_outcomes (passed = 0 , skipped = 2 )
5351
5452
55- def test_tags (pytester : " Pytester" ) -> None :
53+ def test_tags (pytester : pytest . Pytester ) -> None :
5654 """Test the pytest plugin using cwltool as cwl-runner."""
5755 path = pytester .copy_example ("conformance_test_v1.0.cwltest.yml" )
5856 shutil .copy (
@@ -65,7 +63,7 @@ def test_tags(pytester: "Pytester") -> None:
6563 result .assert_outcomes (passed = 1 , skipped = 1 )
6664
6765
68- def test_exclude_tags (pytester : " Pytester" ) -> None :
66+ def test_exclude_tags (pytester : pytest . Pytester ) -> None :
6967 """Test the pytest plugin using cwltool as cwl-runner."""
7068 path = pytester .copy_example ("conformance_test_v1.0.cwltest.yml" )
7169 shutil .copy (
@@ -81,7 +79,7 @@ def test_exclude_tags(pytester: "Pytester") -> None:
8179 result .assert_outcomes (skipped = 2 )
8280
8381
84- def test_badgedir (pytester : " Pytester" ) -> None :
82+ def test_badgedir (pytester : pytest . Pytester ) -> None :
8583 """Test the pytest plugin creates the badges directory."""
8684 path = pytester .copy_example ("conformance_test_v1.0.cwltest.yml" )
8785 shutil .copy (
@@ -95,7 +93,7 @@ def test_badgedir(pytester: "Pytester") -> None:
9593 assert os .path .exists ("cwl-badges" )
9694
9795
98- def test_no_label (pytester : " Pytester" ) -> None :
96+ def test_no_label (pytester : pytest . Pytester ) -> None :
9997 """Test the pytest plugin correctly extracts test names from the id field when label is missing."""
10098 path = pytester .copy_example ("conformance_test_v1.2.cwltest.yaml" )
10199 shutil .copy (
@@ -108,7 +106,7 @@ def test_no_label(pytester: "Pytester") -> None:
108106 result .assert_outcomes (passed = 2 , skipped = 1 )
109107
110108
111- def test_cwltool_hook (pytester : " Pytester" ) -> None :
109+ def test_cwltool_hook (pytester : pytest . Pytester ) -> None :
112110 """Test the pytest plugin using cwltool as cwl-runner."""
113111 path = pytester .copy_example ("conformance_test_v1.0.cwltest.yml" )
114112 shutil .copy (
@@ -119,7 +117,7 @@ def test_cwltool_hook(pytester: "Pytester") -> None:
119117 result .assert_outcomes (passed = 2 )
120118
121119
122- def test_no_hook (pytester : " Pytester" ) -> None :
120+ def test_no_hook (pytester : pytest . Pytester ) -> None :
123121 """Test the pytest plugin using the default cwl-runner."""
124122 path = pytester .copy_example ("conformance_test_v1.0.cwltest.yml" )
125123 _load_v1_0_dir (path )
0 commit comments