diff --git a/tests/test_hooks.py b/tests/test_hooks.py index 2ccac84b2..920fb4f67 100644 --- a/tests/test_hooks.py +++ b/tests/test_hooks.py @@ -21,7 +21,11 @@ def working_directory(tmp_path): def test_append_to_gitignore_file(working_directory): gitignore_file = working_directory / ".gitignore" gitignore_file.write_text("node_modules/\n") + append_to_gitignore_file(".envs/*") + linesep = os.linesep.encode() - assert gitignore_file.read_bytes() == b"node_modules/" + linesep + b".envs/*" + linesep + expected_content = b"node_modules/" + linesep + b".envs/*" + linesep + + assert gitignore_file.read_bytes() == expected_content assert gitignore_file.read_text() == "node_modules/\n.envs/*\n"