Skip to content

Commit

Permalink
Tests: Use pathlib read_text/write_text with encoding(test_custom_ext…
Browse files Browse the repository at this point in the history
…ensions_in_hooks.py)
  • Loading branch information
insspb committed Jun 8, 2022
1 parent 9cdcdc0 commit b403dbe
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/test_custom_extensions_in_hooks.py
Expand Up @@ -39,7 +39,5 @@ def test_hook_with_extension(template, output_dir):
extra_context={'project_slug': 'foobar', 'name': 'Cookiemonster'},
)

with Path(project_dir, 'README.rst').open() as f:
readme = f.read().strip()

assert readme == 'Hello Cookiemonster!'
readme = Path(project_dir, 'README.rst').read_text(encoding="utf8")
assert readme.strip() == 'Hello Cookiemonster!'

0 comments on commit b403dbe

Please sign in to comment.