You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following commands in my tox.ini[testenv] section:
commands =
pdm config --local use_venv True
pdm install -G testing
pytest {posargs}
# The following is only useful in a git repository.
diff-cover coverage.xml
I'd like for tox to be runnable from an unpacked sdist, but that won't be in a git repository, so it fails like so:
py310 run-test: commands[3] | -diff-cover coverage.xml
Traceback (most recent call last):
File "/private/tmp/testing/atpublic-3.0/.tox/py310/bin/diff-cover", line 8, in <module>
sys.exit(main())
File "/private/tmp/testing/atpublic-3.0/.tox/py310/lib/python3.10/site-packages/diff_cover/diff_cover_tool.py", line 258, in main
GitPathTool.set_cwd(directory)
File "/private/tmp/testing/atpublic-3.0/.tox/py310/lib/python3.10/site-packages/diff_cover/git_path.py", line 33, in set_cwd
cls._root = cls._git_root()
File "/private/tmp/testing/atpublic-3.0/.tox/py310/lib/python3.10/site-packages/diff_cover/git_path.py", line 65, in _git_root
git_root = execute(command)[0]
File "/private/tmp/testing/atpublic-3.0/.tox/py310/lib/python3.10/site-packages/diff_cover/command_runner.py", line 45, in execute
raise CommandError(stderr)
diff_cover.command_runner.CommandError: fatal: not a git repository (or any of the parent directories): .git
I can prefix the diff-cover command with - in my tox.ini so the error won't fail the test, but I'd rather provide an option to diff-cover that essentially says "skip me without an error if I'm not in a git repository".
The text was updated successfully, but these errors were encountered:
Hello,I want to ask you some questions.Do you now have some progress about this problem? I also want to use diff cover without git.I want to use diff cover in SVN!!!
I have the following commands in my
tox.ini
[testenv]
section:I'd like for
tox
to be runnable from an unpacked sdist, but that won't be in a git repository, so it fails like so:I can prefix the
diff-cover
command with-
in mytox.ini
so the error won't fail the test, but I'd rather provide an option todiff-cover
that essentially says "skip me without an error if I'm not in a git repository".The text was updated successfully, but these errors were encountered: