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

Switch to pytest framework #225

Open
jonbiemond opened this issue Nov 29, 2024 · 1 comment · May be fixed by #226
Open

Switch to pytest framework #225

jonbiemond opened this issue Nov 29, 2024 · 1 comment · May be fixed by #226

Comments

@jonbiemond
Copy link

jonbiemond commented Nov 29, 2024

I propose switching to the 3rd party pytest framework from the builtin unittest framework.

The pytest framework has a number of advantages over unittest, and is very popular, used by major libraries such as NumPy. Critically, switching to pytest will not require rewriting any existing tests. Some benefits include:

  • The ability to mark tests as slow and skip them for faster development.
  • Easier to use, because it does not require that tests inherit from TestCase.
  • Detailed and easy to understand failing test summaries.

This change will lower the barrier to writing tests for contributors and reduce the friction in running tests by providing an option to skip slow tests. I hope that these improvements will lead to more tests where appropriate and a more stable library.

I've successfully run pytest over the existing test suite, and would be happy to open a small PR upon consensus.

For more information see the docs: https://docs.pytest.org/en/stable/

@JWock82
Copy link
Owner

JWock82 commented Dec 1, 2024

I think this is a great idea. I'd like to keep my focus on some of the engineering/technical parts of Pynite right now. If you want to head this up I will approve the pull requests.

jonbiemond added a commit to jonbiemond/Pynite that referenced this issue Dec 3, 2024
@jonbiemond jonbiemond linked a pull request Dec 3, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants