Hey Thomas, * Thomas De Schampheleire <[email protected]> [2016-03-31 10:23:00 +0200]: > On Thu, Mar 31, 2016 at 6:04 AM, oliver <[email protected]> wrote: > > Announcing a project hosted on GitHub called nose2pytest > > (https://github.com/schollii/nose2pytest). This project helps migrate a test > > suite that was written for Nose to work with pure pytest. It converts > > nose.tools.assert_ functions into raw assert statements so you can better > > (IMO) leverage pytest assertion introspection. It may even decrease test > > suite dependencies by 1; after nose2test has been run on a test suite, it is > > no longer needed. > > > > The nose2pytest script has already successfully converted approximately 5000 > > assertions, so this is v1.0. However, there are many ways to harness Nose > > functionality so I'm really curious to see if nose2test can be useful to > > others. > > > > I'm sure there is lots of room for improvement. Any feedback or > > contributions would be much appreciated. > > > > [...] > > I had a very brief look at your nose2pytest code, and at first sight > it doesn't look complicated to support a unittest2pytest conversion > too? What do you think of that?
There are already two of those: https://github.com/pytest-dev/unittest2pytest https://github.com/dropbox/unittest2pytest > Aside from the assert functions, another type of conversion I had to > make was from unittest-style setUp/tearDown functions to pytest-style: > > setUp(self) --> setup_method(self, method) > tearDown(self) --> teardown_method(self, method) > setUpClass(cls) --> setup_class(cls) > __init__(self, ...) --> setup_class(cls) > ... > > While your README mentions that some replacement can be done with > simple search/replace, I think it would be most useful if even such > things were handled by nose2pytest, so that it becomes a one-stop > solution. I don't think unittest2pytest (either one) handles that, but I'm not sure. Let's just not create a third one please :D Florian -- http://www.the-compiler.org | [email protected] (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc I'm running a crowdfunding to work on my FOSS-project full-time: http://igg.me/at/qutebrowser
signature.asc
Description: Digital signature
_______________________________________________ pytest-dev mailing list [email protected] https://mail.python.org/mailman/listinfo/pytest-dev
