-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot run tests #233
Comments
Please refer to the run-tests.sh shell script in the root directory of this project or the GitHub Actions which also successfully run a gamut of tests against this project. While I cannot personally vouch for Arch Linux success, I do run these tests myself against several operating systems (Windows, OSX, and Linux [Ubuntu and Red Hat]) without issue. Please also note that I have not yet certified this project to run using Python 12. The supported range is listed for this project in badging here at GitHub as well as the published metadata for yamlpath. While yamlpath might run with Python 12, it will definitely NOT run with ruamel.yaml 0.18. Please follow the published metadata for support libraries, which restricts ruamel.yaml to compatible versions. When I exclude versions of ruamel.yaml, it is because incompatible versions cause errors in yamlpath. |
thanks for the detailed response. Unfortunately, the release tarball (https://github.com/wwkimball/yamlpath/releases/download/v3.8.2/yamlpath-3.8.2.tar.gz) does not contain the run-tests.sh. |
The release tarball should not contain development resources. My recommendation isn't to run the script but rather to base your own build's test phase on its content or that of the relevant GitHub Actions. The issue you've presented is that your test runner code isn't working. I provided examples of test runner code that does work. Update your test runner code to match and yours should also work. |
ok, then I would suggest to remove the test resources completely. For me it was unexpected to find a |
That is an interesting proposal. I may do so to reduce the package size. The tests are included only because the original "authoritative" template I used to package this project for release mandated that the tests be included. I will research this to determine whether Python release packages are actually expected to include tests given that release packages necessarily do not include the required test tools like pytest, et al. That said, it is incorrect to state that the tests "cannot" be run. Rather, you aren't setting up your test environment to run them. Release packages cannot include build or test tools, so if you want to run tests against a release package, it falls on you to install and configure the additional tools. I have provided instructions for how to do so. |
I'm providing yamlpath as an Arch linux package. It works fine, but it is recommended to run tests when building the package.
Operating System
Version of Python and packages in use at the time of the issue.
Minimum sample of YAML (or compatible) data necessary to trigger the issue
n/a
Complete steps to reproduce the issue when triggered via:
run pytest in the
test
folderExpected Outcome
all tests should run
Actual Outcome
due to lack of
conftest.py
, errors likeImportError: cannot import name 'info_warn_logger' from 'tests.conftest'
Screenshot(s), if Available
n/a
The text was updated successfully, but these errors were encountered: