1212def test_vec_767_parsing (tmp_path : Path ):
1313 text = "MACH W0B0-8 1.0 FID=3 COB=raw*0.00390625"
1414 p = tmp_path / "test.vec"
15- p .write_text (text )
15+ p .write_text (text , encoding = "utf-8" )
1616
1717 mapping = parse_vec_file_767 (p )
1818 assert "MACH" in mapping
@@ -137,7 +137,7 @@ def test_vec_parser_767_tokens_and_hex_fid(tmp_path: Path) -> None:
137137 """
138138
139139 p = tmp_path / "test.vec"
140- p .write_text (text )
140+ p .write_text (text , encoding = "utf-8" )
141141
142142 mapping = parse_vec_file_767 (p )
143143
@@ -181,7 +181,7 @@ def test_vec_parser_767_tokens_and_hex_fid(tmp_path: Path) -> None:
181181def test_vec_767_type_token (tmp_path : Path ):
182182 text = "ALT W0B0-7 TYPE=BNR 1.0"
183183 p = tmp_path / "test.vec"
184- p .write_text (text )
184+ p .write_text (text , encoding = "utf-8" )
185185
186186 mapping = parse_vec_file_767 (p )
187187 assert mapping ["ALT" ]["type" ] == "BNR"
@@ -193,7 +193,7 @@ def test_vec_767_type_token(tmp_path: Path):
193193def test_vec_767_signed_token (tmp_path : Path ):
194194 text = "ALT W0B0-7 TYPE=BNR SIGNED=true 1.0"
195195 p = tmp_path / "test.vec"
196- p .write_text (text )
196+ p .write_text (text , encoding = "utf-8" )
197197
198198 mapping = parse_vec_file_767 (p )
199199 assert mapping ["ALT" ]["signed" ] is True
@@ -205,7 +205,7 @@ def test_vec_767_signed_token(tmp_path: Path):
205205def test_vec_767_scale_offset (tmp_path : Path ):
206206 text = "ALT W0B0-7 TYPE=BNR SCALE=0.01 OFFSET=100 1.0"
207207 p = tmp_path / "test.vec"
208- p .write_text (text )
208+ p .write_text (text , encoding = "utf-8" )
209209
210210 mapping = parse_vec_file_767 (p )
211211 assert mapping ["ALT" ]["scale" ] == 0.01
@@ -219,7 +219,7 @@ def test_vec_767_scale_offset(tmp_path: Path):
219219def test_vec_767_hex_fid_parsed (tmp_path : Path ):
220220 text = "ALT W0B0-7 TYPE=BNR FID=0x03 1.0"
221221 p = tmp_path / "test.vec"
222- p .write_text (text )
222+ p .write_text (text , encoding = "utf-8" )
223223
224224 mapping = parse_vec_file_767 (p )
225225 assert mapping ["ALT" ].get ("frame_id_767" ) == 3
@@ -231,7 +231,7 @@ def test_vec_767_hex_fid_parsed(tmp_path: Path):
231231def test_vec_767_no_unsupported_kwargs (tmp_path : Path ):
232232 text = "ALT W0B0-7 TYPE=BNR SIGNED=true SCALE=2 OFFSET=3 1.0"
233233 p = tmp_path / "test.vec"
234- p .write_text (text )
234+ p .write_text (text , encoding = "utf-8" )
235235
236236 mapping = parse_vec_file_767 (p )
237237 params = vec_to_parameters_767 (mapping )
@@ -250,7 +250,7 @@ def test_vec_767_no_unsupported_kwargs(tmp_path: Path):
250250def test_vec_767_char_token (tmp_path : Path ):
251251 text = "STR W2B0-7 CHAR 1.0"
252252 p = tmp_path / "test.vec"
253- p .write_text (text )
253+ p .write_text (text , encoding = "utf-8" )
254254
255255 mapping = parse_vec_file_767 (p )
256256 assert mapping ["STR" ]["type" ] == "CHAR"
@@ -262,7 +262,7 @@ def test_vec_767_char_token(tmp_path: Path):
262262def test_vec_767_bcd_token (tmp_path : Path ):
263263 text = "NUM W3B0-11 BCD 1.0"
264264 p = tmp_path / "test.vec"
265- p .write_text (text )
265+ p .write_text (text , encoding = "utf-8" )
266266
267267 mapping = parse_vec_file_767 (p )
268268 assert mapping ["NUM" ]["type" ] == "BCD"
@@ -274,7 +274,7 @@ def test_vec_767_bcd_token(tmp_path: Path):
274274def test_vec_767_cob_formula_with_scale_offset (tmp_path : Path ):
275275 text = "MACH W0B0-15 COB=raw*scale+offset SCALE=2 OFFSET=3 1.0"
276276 p = tmp_path / "test.vec"
277- p .write_text (text )
277+ p .write_text (text , encoding = "utf-8" )
278278
279279 mapping = parse_vec_file_767 (p )
280280 params = vec_to_parameters_767 (mapping )
@@ -288,7 +288,7 @@ def test_vec_767_cob_formula_with_scale_offset(tmp_path: Path):
288288def test_vec_767_invalid_hex_fid (tmp_path : Path ):
289289 text = "ALT W0B0-7 FID=0xINVALID 1.0"
290290 p = tmp_path / "test.vec"
291- p .write_text (text )
291+ p .write_text (text , encoding = "utf-8" )
292292
293293 mapping = parse_vec_file_767 (p )
294294 # Should safely default or ignore instead of raising ValueError
0 commit comments