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'm trying to package your module as rpm packag. So I'm using typical in such case build, install and test cycle used on building package from non-root account:
"setup.py build"
"setup.py install --root </install/prefix>"
"pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
Hi, sorry for slow reply, I've been away from civilisation.
You're running the tests directly using pytest?
You'll either need to install pip install the test-requirements.txt beforehand, or remove any flags from pyproject.toml that don't work without the corresponding plugin being installed. (e.g. The --force-sugar flag (in pyproject.toml) is used by pytest-sugar. )
OK I've decided to remove using pytest-sugar as seems like it is only decoration.
After remove pytest is failing with errors.
Just in casse I'm using autogenerated from git tah source tar ball.
These look like the errors I get if git isn't available or is not found.
Did you follow the README instructions for tests?
.... needs the git executable to be installed on the system and available in your PATH for most operations. If it is not in your PATH, you can help GitPython find it by setting the GIT_PYTHON_GIT_EXECUTABLE=<path/to/git> environment variable
Important: Right after cloning this repository, please be sure to have executed the ./init-tests-after-clone.sh script in the repository root. Otherwise you will encounter test failures.
If you've done those, then i'm stumped.
I think the error is due to no git_dir being defined. The path given is in helper.py: GIT_REPO = os.environ.get("GIT_PYTHON_TEST_GIT_REPO_BASE", ospd(ospd(ospd(__file__))))
So if this does not return a string-path to a .git (or a dir containing a .git), AND the backup GIT_DIR env variable is not set then all tests fail.
Do the tests work if you just clone the github repo, run the bash script, and run pytest from the root folder?
Activity
Byron commentedon Aug 19, 2021
To me it looks like
pytestisn't recent enough or it lacks a plugin. Maybe @Yobmod has a better idea about this though.Yobmod commentedon Sep 9, 2021
Hi, sorry for slow reply, I've been away from civilisation.
You're running the tests directly using pytest?
You'll either need to install pip install the test-requirements.txt beforehand, or remove any flags from pyproject.toml that don't work without the corresponding plugin being installed. (e.g. The --force-sugar flag (in pyproject.toml) is used by pytest-sugar. )
kloczek commentedon Sep 9, 2021
OK I've decided to remove using
pytest-sugaras seems like it is only decoration.After remove pytest is failing with errors.
Just in casse I'm using autogenerated from git tah source tar ball.
Log
Yobmod commentedon Sep 9, 2021
These look like the errors I get if git isn't available or is not found.
Did you follow the README instructions for tests?
If you've done those, then i'm stumped.
I think the error is due to no git_dir being defined. The path given is in helper.py:
GIT_REPO = os.environ.get("GIT_PYTHON_TEST_GIT_REPO_BASE", ospd(ospd(ospd(__file__))))So if this does not return a string-path to a .git (or a dir containing a .git), AND the backup GIT_DIR env variable is not set then all tests fail.
Do the tests work if you just clone the github repo, run the bash script, and run pytest from the root folder?
kloczek commentedon Sep 9, 2021
git binary is avalable in build env.
OK will try oteher parts of the description.
Thank you.
Byron commentedon Sep 10, 2021
Additionally,
./init-tests-after-clone.shshould be executed to get the clone ready for running the tests.