25
25
from pathlib import Path
26
26
27
27
28
- @pytest .fixture ()
28
+ @pytest .fixture
29
29
def info_caplog (caplog : pytest .LogCaptureFixture ) -> pytest .LogCaptureFixture :
30
30
"""Return a ``pytest.caplog`` fixture with the logging level set to ``INFO`` / 10."""
31
31
caplog .set_level (logging .INFO )
32
32
return caplog
33
33
34
34
35
- @pytest .fixture ()
35
+ @pytest .fixture
36
36
def test_configs (
37
37
tmp_path : Path ,
38
38
valid_json_data : dict [str , str ],
@@ -45,13 +45,13 @@ def test_configs(
45
45
return test_configs_file , valid_json_data
46
46
47
47
48
- @pytest .fixture ()
48
+ @pytest .fixture
49
49
def test_configs_as_str (test_configs : tuple [Path , dict [str , str ]]) -> str :
50
50
"""Return a temporary configs ``JSON`` file as a string."""
51
51
return str (test_configs [0 ])
52
52
53
53
54
- @pytest .fixture ()
54
+ @pytest .fixture
55
55
def empty_test_configs (tmp_path : Path ) -> Path :
56
56
"""Return an empty temporary configs ``JSON`` file."""
57
57
test_configs_file : Path = tmp_path / "test_configs.json"
@@ -61,7 +61,7 @@ def empty_test_configs(tmp_path: Path) -> Path:
61
61
return test_configs_file
62
62
63
63
64
- @pytest .fixture ()
64
+ @pytest .fixture
65
65
def invalid_test_configs (
66
66
tmp_path : Path ,
67
67
invalid_json_data : str ,
@@ -74,13 +74,13 @@ def invalid_test_configs(
74
74
return test_configs_file , invalid_json_data
75
75
76
76
77
- @pytest .fixture ()
77
+ @pytest .fixture
78
78
def test_log (tmp_path : Path ) -> Path :
79
79
"""Return a temporary log file."""
80
80
return tmp_path / "test.log"
81
81
82
82
83
- @pytest .fixture ()
83
+ @pytest .fixture
84
84
def valid_json_data () -> dict [str , str ]:
85
85
"""Return valid ``JSON`` data."""
86
86
return {
@@ -89,13 +89,13 @@ def valid_json_data() -> dict[str, str]:
89
89
}
90
90
91
91
92
- @pytest .fixture ()
92
+ @pytest .fixture
93
93
def invalid_json_data () -> str :
94
94
"""Return invalid ``JSON``."""
95
95
return "invalid json data"
96
96
97
97
98
- @pytest .fixture ()
98
+ @pytest .fixture
99
99
def extension_paths (tmp_path : Path ) -> dict [str , Path ]:
100
100
"""Return a a ``dict`` that binds file extensions to a temporary path."""
101
101
return {
@@ -104,13 +104,13 @@ def extension_paths(tmp_path: Path) -> dict[str, Path]:
104
104
}
105
105
106
106
107
- @pytest .fixture ()
107
+ @pytest .fixture
108
108
def path_for_undefined_extensions (tmp_path : Path ) -> Path :
109
109
"""Return a temporary path which will be the path for undefined extensions."""
110
110
return tmp_path / "undefined"
111
111
112
112
113
- @pytest .fixture ()
113
+ @pytest .fixture
114
114
def test_log_as_str (tmp_path : Path ) -> str :
115
115
"""Return a temporary log file as a string."""
116
116
return str (tmp_path / "auto-file-sorter.log" )
0 commit comments