diff options
author | Adam Turner <9087854+aa-turner@users.noreply.github.com> | 2022-04-27 03:11:08 +0100 |
---|---|---|
committer | Adam Turner <9087854+aa-turner@users.noreply.github.com> | 2022-04-27 03:11:08 +0100 |
commit | 4674cc11c83c302102c167123de00a68b3d5dd88 (patch) | |
tree | 38c7a19f3621b4566de8a7eeefe64d4d72112d2a /tests/test_util_fileutil.py | |
parent | 24e3b7c8c8c0a2d01ec2d2d4d04105bcb565e440 (diff) | |
download | sphinx-git-4674cc11c83c302102c167123de00a68b3d5dd88.tar.gz |
`.write_text(...)` -> `.write_text(..., encoding='utf8')`
Diffstat (limited to 'tests/test_util_fileutil.py')
-rw-r--r-- | tests/test_util_fileutil.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_util_fileutil.py b/tests/test_util_fileutil.py index d7463ef66..8ae3f918f 100644 --- a/tests/test_util_fileutil.py +++ b/tests/test_util_fileutil.py @@ -64,13 +64,13 @@ def test_copy_asset(tempdir): # prepare source files source = (tempdir / 'source') source.makedirs() - (source / 'index.rst').write_text('index.rst') - (source / 'foo.rst_t').write_text('{{var1}}.rst') + (source / 'index.rst').write_text('index.rst', encoding='utf8') + (source / 'foo.rst_t').write_text('{{var1}}.rst', encoding='utf8') (source / '_static').makedirs() - (source / '_static' / 'basic.css').write_text('basic.css') + (source / '_static' / 'basic.css').write_text('basic.css', encoding='utf8') (source / '_templates').makedirs() - (source / '_templates' / 'layout.html').write_text('layout.html') - (source / '_templates' / 'sidebar.html_t').write_text('sidebar: {{var2}}') + (source / '_templates' / 'layout.html').write_text('layout.html', encoding='utf8') + (source / '_templates' / 'sidebar.html_t').write_text('sidebar: {{var2}}', encoding='utf8') # copy a single file assert not (tempdir / 'test1').exists() |