8000 Fix test expectations for .gitignore comment created by Python 3.13+ venv by hroncok · Pull Request #2672 · pypa/virtualenv · GitHub
[go: up one dir, main page]

Skip to content

Fix test expectations for .gitignore comment created by Python 3.13+ venv #2672

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix test expectations for .gitignore comment created by Python 3.13+ …
…venv

Since Python 3.13, the .gitignore file is created by venv:
python/cpython#108125

Fixes #2670
  • Loading branch information
hroncok committed Nov 29, 2023
commit e3bd8e830787c166be31e2a9ee3d1ec6e6d46038
6 changes: 5 additions & 1 deletion tests/unit/create/test_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,11 @@ def list_to_str(iterable):
assert result == "None"

git_ignore = (dest / ".gitignore").read_text(encoding="utf-8")
assert git_ignore.splitlines() == ["# created by virtualenv automatically", "*"]
if creator_key == "venv" and sys.version_info >= (3, 13):
comment = "# Created by venv; see https://docs.python.org/3/library/venv.html"
else:
comment = "# created by virtualenv automatically"
assert git_ignore.splitlines() == [comment, "*"]


def test_create_vcs_ignore_exists(tmp_path):
Expand Down
0