@@ -363,7 +363,7 @@ def test_build_not_dir_outdir(mocker, tmp_dir, package_test_flit):
363
363
builder ._hook .build_sdist .return_value = 'dist.tar.gz'
364
364
out = os .path .join (tmp_dir , 'out' )
365
365
366
- open (out , 'a' ).close () # create empty file
366
+ open (out , 'a' , encoding = 'utf-8' ).close () # create empty file
367
367
368
368
with pytest .raises (build .BuildException ):
369
369
builder .build ('sdist' , out )
@@ -410,7 +410,7 @@ def test_build_with_dep_on_console_script(tmp_path, demo_pkg_inline, capfd, mock
410
410
'''
411
411
)
412
412
(tmp_path / 'pyproject.toml' ).write_text (toml , encoding = 'UTF-8' )
413
- (tmp_path / 'build.py' ).write_text (code )
413
+ (tmp_path / 'build.py' ).write_text (code , encoding = 'utf-8' )
414
414
415
415
deps = {str (demo_pkg_inline )} # we patch the requires demo_pkg_inline to refer to the wheel -> we don't need index
416
416
mocker .patch ('build.ProjectBuilder.build_system_requires' , new_callable = mocker .PropertyMock , return_value = deps )
@@ -462,7 +462,7 @@ def test_prepare_not_dir_outdir(mocker, tmp_dir, package_test_flit):
462
462
builder = build .ProjectBuilder (package_test_flit )
463
463
464
464
out = os .path .join (tmp_dir , 'out' )
465
- with open (out , 'w' ) as f :
465
+ with open (out , 'w' , encoding = 'utf-8' ) as f :
466
466
f .write ('Not a directory' )
467
467
with pytest .raises (build .BuildException , match = 'Build path .* exists and is not a directory' ):
468
468
builder .prepare ('wheel' , out )
0 commit comments