Closed kloczek closed 4 months ago
GHA can reproduce these problems for pytest master
, see https://github.com/pytest-dev/pytest-rerunfailures/runs/2662425068?check_suite_focus=true
Good 😊 (I mean .. bad 😊 ) So what it could be? pytest issue or something which needs to be addressed in pytest-rerunfailures code?🤔
@kloczek Sorry I was wrong about GHA: pytest switched the default branch from master
to main
, this broke GHA. I fixed this in #160 and cannot reproduce the problems you had running against pytest main
.
Locally the tests are fine, too; but I am testing against master
of pytest-rerunfailures
– what happens, if you test against master
?
tox is usimg pytest inside virtual env and testing tox is OK. Because of that now I think that it is not matter of pytest per se but it may be matter of one of the pytest extensions lited on top of that ticket.
BTW I just found that I was wrong abou tox. Looks lik etox produces error:
+ /usr/bin/python3 -Bm tox --skip-missing-interpreters
.tox create: /home/tkloczko/rpmbuild/BUILD/pytest-rerunfailures-9.1.1/.tox/.tox
.tox installdeps: tox >= 3.17.1
GLOB sdist-make: /home/tkloczko/rpmbuild/BUILD/pytest-rerunfailures-9.1.1/setup.py
linting create: /home/tkloczko/rpmbuild/BUILD/pytest-rerunfailures-9.1.1/.tox/linting
linting installdeps: pre-commit>=1.11.0
linting installed: appdirs==1.4.4,cfgv==3.3.0,distlib==0.3.1,filelock==3.0.12,identify==2.2.6,nodeenv==1.6.0,pre-commit==2.13.0,PyYAML==5.4.1,six==1.16.0,toml==0.10.2,virtualenv==20.4.7
linting run-test-pre: PYTHONHASHSEED='276315336'
linting run-test: commands[0] | pre-commit run --all-files --show-diff-on-failure
An error has occurred: FatalError: git failed. Is it installed, and are you in a Git repository directory?
Check the log at /home/tkloczko/.cache/pre-commit/pre-commit.log
ERROR: InvocationError for command /home/tkloczko/rpmbuild/BUILD/pytest-rerunfailures-9.1.1/.tox/linting/bin/pre-commit run --all-files --show-diff-on-failure (exited with code 1)
So you think the issue is invalid?
At least the last error implies that git is not working correctly, so pre-commit is failing. Is tox in this case running from a checkout of pytest-rerunfailures or from the release? In the latter case, the linting checker might not work as intended but should also not be needed to test functionality, and could be skipped.
I think that issue is a it deeper. Looks like the test suite is used on actual developement and as set of final checks before actual commit. I have notbing against that kind of bits but IMO by default pytest or tox shoud be performinfg actual functional code testing than for examp,e checkiing "do I run in in working git tree?". IMO bits used on acrtual development cycle should be not default set of tests. Behaviour like here is possible sometimes to see but I would say that +99.8% test suites is focused on testing the code before it will be part of the system resources than doing set of final chacks before actula commit.
Closing because this ticket is now outdated.
Generally tox is OK but it prints one warning:
Additionally output of the pytest in build env where I have installed many pytest extensions (so some of those errors may be false positive or result of some errors in those plugins. I think that it would be good if you will have a look on below log: