> as to whether we are should use pytest fixtures and parametrized classes and 
> functions.

Absolutely!

 > the disadvantage is being dependent on pytest as unittest does not
support that functionality.

Which is the whole point of using pytest, yes?

I’m very opinionated about this, but I really dislike unittest — it’s
simply way too Java-y — makes the easy things harder than they should
be, and is missing critical should-be-easy features.

I moved to pure pytest a few years ago, and have been very happy about
it.  In fact, I recently converted some d unittest code to pure
pytest, and it was literally about 1/4 as much code.

The only reason I can see to avoid pytest features is that it’s not in
the standard lib — but it’s not a run-time dependency, and it’s easy
to install and well supported — so all good.

I suppose we may want to avoid some of pytest’s more magical esoteric
features, but certainly not core functionality like fixtures and
parameterized tests.

-CHB
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion

Reply via email to