smart_open icon indicating copy to clipboard operation
smart_open copied to clipboard

Switch test runner to pytest

Open mpenkov opened this issue 4 years ago • 2 comments

Please use self.assertEqual, here and everywhere:

  • It's consistent with the rest of the code
  • It gives more informative messages via the test runner

It is because I'm using py.test everywhere, it is able to generate great debug info from regular assert calls (BTW I strongly recommend as unit test runner here too, it should be able to run current tests). But for now I of course change it.

Originally posted by @mrk-its in https://github.com/RaRe-Technologies/smart_open/pull/383

mpenkov avatar Nov 09 '19 12:11 mpenkov

Is this still a valid issue? I could probably contribute here but I'm not clear as to what the issue is. It looks like pytest is being used to run the tests currently. Does this ticket mean to have the command python setup.py test run pytest? This is a fairly easy thing to do and I could knock it out quickly.

Amertz08 avatar Apr 01 '20 04:04 Amertz08

No, I think the idea was to rewrite the tests so they look like py.test ones instead of the standard library's unittest ones. Pytest has its own way of dealing with fixtures, etc.

Leave this item with me, I'm still working out what exactly to do, whether it's worth it, and when to do it.

mpenkov avatar Apr 01 '20 05:04 mpenkov