smart_open
smart_open copied to clipboard
Switch test runner to pytest
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
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.
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.