@@ -27,7 +27,7 @@ def get_installed_distributions() -> list[tuple[str, str]]:
27
27
"""Return a list of installed Distribution objects."""
28
28
try :
29
29
return [(d .name , d .version ) for d in meta .distributions ()]
30
- except (ImportError , AttributeError , TypeError ):
30
+ except (ImportError , AttributeError , TypeError ): # pragma: no cover
31
31
return []
32
32
33
33
@@ -142,10 +142,10 @@ def pytest_report_header(config: pytest.Config) -> str | None:
142
142
data .extend (get_version (k ))
143
143
ret .append ("\n " .join ([f" { k } : { v } " for k , v in sorted (data )]))
144
144
145
- if config .option .echo_attribues :
145
+ if config .option .echo_attributes :
146
146
ret .extend ([
147
147
"Inspections:" ,
148
- "\n " .join ([f" { k } : { get_module_attribute (k )} " for k in config .option .echo_attribues ]),
148
+ "\n " .join ([f" { k } : { get_module_attribute (k )} " for k in config .option .echo_attributes ]),
149
149
])
150
150
if not ret :
151
151
ret = ["pytest-echo: nothing to echoing" ]
@@ -192,7 +192,7 @@ def pytest_addoption(parser: pytest.Parser) -> None:
192
192
group .addoption (
193
193
"--echo-attr" ,
194
194
action = "append" ,
195
- dest = "echo_attribues " ,
195
+ dest = "echo_attributes " ,
196
196
default = [],
197
197
help = "attribute to print (full path)" ,
198
198
)
@@ -208,18 +208,16 @@ def pytest_load_initial_conftests(
208
208
for entry in _load_values (early_config ):
209
209
if entry .type in {"env" , "envs" , "echo_envs" }:
210
210
early_config .option .echo_envs .append (entry .key )
211
- if entry .type in {"attr" , "attribute" , "echo_attribute " }:
211
+ if entry .type in {"attr" , "attribute" , "echo_attributes " }:
212
212
early_config .option .echo_attributes .append (entry .key )
213
213
if entry .type in {"version" , "echo_version" }:
214
214
early_config .option .echo_versions .append (entry .key )
215
215
216
216
217
217
def _load_values (early_config : pytest .Config ) -> Iterator [Entry ]:
218
- has_toml_conf = False
219
- if not has_toml_conf :
220
- for var in early_config .getini ("echo_envs" ):
221
- yield Entry (var , "env" )
222
- for var in early_config .getini ("echo_attributes" ):
223
- yield Entry (var , "attr" )
224
- for var in early_config .getini ("echo_versions" ):
225
- yield Entry (var , "version" )
218
+ for var in early_config .getini ("echo_envs" ):
219
+ yield Entry (var , "env" )
220
+ for var in early_config .getini ("echo_attributes" ):
221
+ yield Entry (var , "attr" )
222
+ for var in early_config .getini ("echo_versions" ):
223
+ yield Entry (var , "version" )
0 commit comments