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

How to run / add to tests? #54

Open
ChrisJefferson opened this issue Jul 5, 2020 · 4 comments
Open

How to run / add to tests? #54

ChrisJefferson opened this issue Jul 5, 2020 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@ChrisJefferson
Copy link
Contributor

Hi,

Sorry, I don't know a lot about making Python packages.

I wanted to add some tests for some code I was adding, but I wasn't sure how the tests are structured in the package. Should 'tests' made of TestCases? I had a google and found: https://python-packaging.readthedocs.io/en/latest/testing.html , but I don't think that's what's going on.

@alexeyignatiev
Copy link
Collaborator

Thanks for your question! Actually, it's a shame that there are (almost) no tests in PySAT. :) If you want to prepare one, just create a Python file in tests/. Running $ pytest in the root of the project should do the trick, i.e. it will run every test in that directory. (For that, make sure you have the pytest package installed, e.g. from pip.)

@alexeyignatiev
Copy link
Collaborator

I forgot to mention that there is one example test in tests, which you may want to follow.

@alexeyignatiev alexeyignatiev added the help wanted Extra attention is needed label Jul 27, 2020
@ghost
Copy link

ghost commented Dec 8, 2023

@alexeyignatiev Is this task still relevant? I can help with more tests, including using Hypothesis. Also I can setup & check whole codebase with Ruff linter.

@alexeyignatiev
Copy link
Collaborator

@dulanov, adding proper testing functionality is definitely still relevant. So your contribution here would be more than welcome! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants