Skip to content

Test suite appears to have a dependency on the user's global git config #11058

Open
@pfmoore

Description

@pfmoore

Description

I have init.defaultbranch=main in my git config, and a bunch of tests are failing with AssertionError: assert 'main' == 'master'.

I haven't looked in detail at these, but it looks like the global config is leaking into the tests.

Expected behavior

Test suite runs the same regardless of the user's configuration.

pip version

main branch

Python version

3.10

OS

Windows 11

How to Reproduce

Run the test suite with init.defaultbranch=main in your global git config. About 13 tests fail.

Output

No response

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: testsTesting and related thingstype: bugA confirmed bug or unintended behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions