Specify encoding to avoid EncodingWarning

This commit is contained in:
Adam Turner
2024-07-29 18:21:01 +01:00
parent b0485f9323
commit a4102a7507
3 changed files with 4 additions and 3 deletions

View File

@@ -696,7 +696,7 @@ def test_autogen(rootdir, tmp_path):
def test_autogen_remove_old(rootdir, tmp_path):
"""Test the ``--remove-old`` option."""
tmp_path.joinpath('other.rst').write_text('old content')
tmp_path.joinpath('other.rst').write_text('old content', encoding='utf-8')
with chdir(rootdir / 'test-templating'):
args = ['-o', str(tmp_path), '-t', '.', 'autosummary_templating.txt']
autogen_main(args)