CrossHair icon indicating copy to clipboard operation
CrossHair copied to clipboard

Migrate to pytest

Open pschanely opened this issue 4 years ago • 3 comments

Pytest seems like it might be better for us then unittest:

  • it works better with mypy (because mypy understands real asserts)
  • It's easier to selectively run tests (CrossHair has a lot of not-fast tests)

pschanely avatar Jan 28 '21 19:01 pschanely

Many tests are in pytest now, and we're preferring pytest for new tests. pytest also runs unittest tests, so we're not (yet) aggressively converting old tests.

pschanely avatar Jun 14 '21 14:06 pschanely

We have a lot of tests still using unittest. If you're looking for a straightforward way to get involved in CrossHair, converting some *_test.py files to pytest might be a good start!

pschanely avatar Oct 17 '21 13:10 pschanely

There are only about 10 test files left using unittest, and I think they are all simple (no setup, teardown, or subTests). We are close!

pschanely avatar Oct 05 '22 21:10 pschanely