Skip to content
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

Document how to run tests locally #256

Open
dokterbob opened this issue Mar 31, 2021 · 7 comments
Open

Document how to run tests locally #256

dokterbob opened this issue Mar 31, 2021 · 7 comments

Comments

@dokterbob
Copy link
Contributor

As a contributor, I was unable to successfully run the tests locally. It would be great to have a few lines in the README on how to do this, without having to plough through or know much about the actual tooling to use.

Note that in the case of the more likely contributions, it would make most sense to be able to run a single pass of the tests on whatever locally installed Python, as to have a quicker evaluation - and to have the CI take care of more extensive platform-testing.

@dokterbob
Copy link
Contributor Author

Specifically:

  1. A single command to install test dependencies pip install tox (or whatever is required)
  2. A single command to run the tests, e.g. tox

Obviously, I would not be writing this unless I would have certainty that the above commands are valid. ;)

@ntninja
Copy link
Contributor

ntninja commented Mar 31, 2021

True, true. I'll add that to README!

It's tox -e py3 for just the tests, but tox (without anything) works too. However the test suite requires the go-IPFS ipfs binary to be in ${PATH} or the integration test suit will be skipped. Could be that it just fails altogether though, I never actually tried running it like this.

@c0llab0rat0r
Copy link
Contributor

the test suite requires the go-IPFS ipfs binary to be in ${PATH} or the integration test suit will be skipped.

This being the case, it would also be helpful to have instructions on how to install go-IPFS

ntninja added a commit that referenced this issue Apr 9, 2021
@ntninja
Copy link
Contributor

ntninja commented Apr 9, 2021

I've added a section to the README that should explain this essential process: https://github.com/ipfs-shipyard/py-ipfs-http-client#setting-up-a-local-development-environment

Feedback? Anything that should be expended upon?

@c0llab0rat0r
Copy link
Contributor

Feedback in #270.

https://pypi.org/project/pytest-docker/ is a potential future improvement on this.

@dokterbob
Copy link
Contributor Author

the test suite requires the go-IPFS ipfs binary to be in ${PATH} or the integration test suit will be skipped.

This being the case, it would also be helpful to have instructions on how to install go-IPFS

Just a link to the go-ipfs documentation on this should suffice, and of course mentioning that it is a requirement for testing.

@c0llab0rat0r
Copy link
Contributor

@dokterbob do you have any follow up questions on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants