@@ -117,15 +117,15 @@ def test_dedents_properly_when_file_does_not_contain_pattern(self, fixtures_path
117
117
caplog .set_level (logging .INFO )
118
118
logger = get_indented_logger (__name__ )
119
119
logger .reset ()
120
- globs = f"{ fixtures_path } /glob/**/*.txt"
121
120
overrides = {
122
121
"current_version" : "1.2.3" ,
123
- "files" : [{"glob" : str ( globs ) , "ignore_missing_file" : True , "ignore_missing_version" : True }],
122
+ "files" : [{"glob" : "glob/**/*.txt" , "ignore_missing_file" : True , "ignore_missing_version" : True }],
124
123
}
125
- conf , version_config , current_version = get_config_data (overrides )
126
- configured_file1 = files .ConfiguredFile (conf .files_to_modify [0 ], version_config )
127
- configured_file2 = files .ConfiguredFile (conf .files_to_modify [1 ], version_config )
128
- configured_file3 = files .ConfiguredFile (conf .files_to_modify [2 ], version_config )
124
+ with inside_dir (fixtures_path ):
125
+ conf , version_config , current_version = get_config_data (overrides )
126
+ configured_file1 = files .ConfiguredFile (conf .files_to_modify [0 ], version_config )
127
+ configured_file2 = files .ConfiguredFile (conf .files_to_modify [1 ], version_config )
128
+ configured_file3 = files .ConfiguredFile (conf .files_to_modify [2 ], version_config )
129
129
new_version = current_version .bump ("patch" )
130
130
ctx = get_context (conf )
131
131
@@ -141,12 +141,15 @@ def test_dedents_properly_when_file_does_not_contain_pattern(self, fixtures_path
141
141
assert logs [2 ] == (
142
142
f"\n File { configured_file1 .file_change .filename } : replace `{{current_version}}` with `{{new_version}}`"
143
143
)
144
- assert logs [3 ] == (
144
+ assert logs [3 ] == " File not found, but ignoring"
145
+ assert logs [4 ] == (
145
146
f"\n File { configured_file2 .file_change .filename } : replace `{{current_version}}` with `{{new_version}}`"
146
147
)
147
- assert logs [4 ] == (
148
+ assert logs [5 ] == " File not found, but ignoring"
149
+ assert logs [6 ] == (
148
150
f"\n File { configured_file3 .file_change .filename } : replace `{{current_version}}` with `{{new_version}}`"
149
151
)
152
+ assert logs [7 ] == " File not found, but ignoring"
150
153
151
154
152
155
def test_single_file_processed_twice (tmp_path : Path ):
0 commit comments