Skip to content

pytest overwrites .gitignore and README.md when run with --pdb #4393

@cdeil

Description

@cdeil

There's an issue that was introduced in #3982 .

Running pytest -v test.py --pdb on a test that raises an exception will create or overwrite the .gitignore and README.md files in the current working directory.

At least I had one case where this happened, with Python 2.7.15, pytest-3.10.1, py-1.7.0, pluggy-0.8.0 because for some reason there:

cachedir: .

See https://gist.github.com/cdeil/a90f0b5727a6187d06ecbf6be68af0ad

This writing of .gitignore and README.md was introduced in #4390, so cc @nicoddemus .

Can you reproduce the issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: cacherelated to the cache builtin pluginstatus: needs informationreporter needs to provide more information; can be closed after 2 or more weeks of inactivitytype: bugproblem that needs to be addressed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions