(tmp_path)
| 713 | |
| 714 | |
| 715 | def test_gitignore(tmp_path): |
| 716 | # GIVEN a repository |
| 717 | repo = Repository.create(tmp_path) |
| 718 | repo.create_commit() |
| 719 | |
| 720 | # WHEN adding a path to the gitignore |
| 721 | with cd(str(repo.path)): |
| 722 | gitignore(Path("*.pyc")) |
| 723 | |
| 724 | # THEN the path is added to the gitignore file |
| 725 | gitignore_content = (repo.path / ".gitignore").read_text() |
| 726 | assert "\n*.pyc\n" in gitignore_content |
| 727 | |
| 728 | |
| 729 | def test_gitignore_with_existing_gitignore(tmp_path): |
nothing calls this directly
no test coverage detected