@@ -96,8 +96,9 @@ class YamlTestItem(pytest.Item):
9696 def __init__ (
9797 self ,
9898 name : str ,
99- collector : YamlTestFile ,
100- config : Config ,
99+ parent : Optional [YamlTestFile ] = None ,
100+ config : Optional [Config ] = None ,
101+ * ,
101102 files : List [File ],
102103 starting_lineno : int ,
103104 expected_output_lines : List [str ],
@@ -106,7 +107,7 @@ def __init__(
106107 mypy_config : str ,
107108 parsed_test_data : Dict [str , Any ],
108109 ) -> None :
109- super ().__init__ (name , collector , config )
110+ super ().__init__ (name , parent , config )
110111 self .files = files
111112 self .environment_variables = environment_variables
112113 self .disable_cache = disable_cache
@@ -117,9 +118,9 @@ def __init__(
117118 self .same_process = self .config .option .mypy_same_process
118119
119120 # config parameters
120- self .root_directory = config .option .mypy_testing_base
121- if config .option .mypy_ini_file :
122- self .base_ini_fpath = os .path .abspath (config .option .mypy_ini_file )
121+ self .root_directory = self . config .option .mypy_testing_base
122+ if self . config .option .mypy_ini_file :
123+ self .base_ini_fpath = os .path .abspath (self . config .option .mypy_ini_file )
123124 else :
124125 self .base_ini_fpath = None
125126 self .incremental_cache_dir = os .path .join (self .root_directory , ".mypy_cache" )
0 commit comments