improve filehandle hygene

This commit is contained in:
Paul Gauthier 2023-07-06 12:29:49 -07:00
parent 656af5cd83
commit 0f1af1d991
2 changed files with 3 additions and 3 deletions

View file

@ -240,7 +240,7 @@ Do this:
# Call the run method with a message
coder.run(with_message="hi")
content = open(file1, encoding="utf-8").read()
content = Path(file1).read_text(encoding="utf-8")
# check for one trailing newline
self.assertEqual(content, new_content + "\n")