use pytest or not use pytest?
In the README it suggests to use pytest for test discovery. pytest has a bunch of other features, but some of those features don't work when test classes subclass unittest.TestCase.
If wasmtime-py wanted to use pytest, then I would throw together a PR that makes the following changes:
- remove instances of subclassing
unittest.TestCase - switch from unittest assert methods to
assert x == ystatements - switch to
pytest.raises
If wasmtime-py wanted to use unittest, I could throw together a PR that fixes setup.py so that python setup.py test works.
Any preference?
I don't personally mind going either way myself, I was mostly just getting confused when I set this up originally. So long as it's easy to write tests and it's easy to run tests I don't think it matters too much what the specifics are!
fixes
setup.pyso thatpython setup.py testworks.That's deprecated.
Oh neat! I didn't know that. It was always a pain in the ass to support.
pytest has some niceties around what gets displayed in test failures when using regular asserts. Otherwise it seems like six-of-one vs. half-dozen-of-the-other with this test suite.
Hi Alex (and Will). As I promised in my email a few days ago I've just submitted a PR... so hopefully I'm more welcome to chime in here as a random bloke in Seattle than I was before.
I'm a big fan of pytest over unittest.
pytest gives you lots of information when tests fail, because of all its magical cleverness.