Closed kloczek closed 7 months ago
Yes, most tests not only require the checked-out Git repo, they also need the Git submodules to be checked out with https://github.com/mgeier/sphinx-last-updated-by-git/blob/master/tests/update_submodules.py.
So what do you reccomend as method of testing your module on the system which is cut off from access to the public network? 🤔
Maybe not test it at all?
Or if you want to check if the git
command is found, you should be able to run the tests test_without_git_repo
and test_without_git_repo_without_warning
, which are the ones which don't need a Git repo (but they need the git
command to be available).
@kloczek Do you have any further questions? Or can we close this?
Or if you want to check if the git command is found, you should be able to run the tests test_without_git_repo and test_without_git_repo_without_warning, which are the ones which don't need a Git repo (but they need the git command to be available).
@kloczek Do you have any further questions? Or can we close this?
It is still not clear for me what exactly I need to add to pytest params to avoid execution those units which needs git metadata 🤔
You can try this:
python -m pytest -k test_without_git_repo
This should run the two tests I mentioned above and nothing else.
@kloczek Did you make progress on this?
Do you need more help? Or can I close this issue?
One sec .. just send upgraded package to automation 😋
@kloczek Any updates?
I assume everything is working now. If no, please let me know.
python -m pytest -k test_without_git_repo
I think that it could be added pytest mark skipping automatically units which needs git repo metadata if there is no .git/
directory. 🤔
This should run the two tests I mentioned above and nothing else.
OK 👍
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulescut off from access to the public network
(pytest is executed with-m "not network"
)I'm gueassing that at least some units are fsailing because I'm usimg as input resourcee autogenerated tar ball from git tag so source tree does not have .git/ directory with git metadata. Should I try to initialize tit repo as work around?
Here is pytest output:
Here is list of installed modules in build env