Cirq icon indicating copy to clipboard operation
Cirq copied to clipboard

check/pytest-changed-files doesn't run tests for new files

Open cduck opened this issue 4 years ago • 2 comments

cduck avatar Aug 20 '19 02:08 cduck

Once a file is commited pytest-changed-files works as expected.

cduck avatar Aug 20 '19 03:08 cduck

It seems like this is an issue with git diff not applying to untracked files. If the file is staged or committed, ./check/pytest-changed-files works.

What would be the preferred way to handle this? Keep as is and update the documentation, or add a script to stage untracked _test.py files before git diff in pytest-changed-files? Or something else?

joelmasters avatar Jun 25 '22 21:06 joelmasters

Closing this as obsolete. While I can see it is annoying to have pytest-changed-files not check untracked files, I don't know if having it do that for arbitrary unchecked files is a good idea. Besides, there is an easy work-around "git add "

dstrain115 avatar Feb 07 '24 14:02 dstrain115