[pytest-dev] Converting unittest to pytest (was: Re: ANN: nose2pytest 1.0)

Thomas De Schampheleire patrickdepinguin at gmail.com
Sun Apr 10 15:26:39 EDT 2016


Hi Florian,

On Thu, Mar 31, 2016 at 10:36 AM, Florian Bruhin <me at the-compiler.org> wrote:
> Hey Thomas,
>
> * Thomas De Schampheleire <patrickdepinguin at gmail.com> [2016-03-31 10:23:00 +0200]:
>> On Thu, Mar 31, 2016 at 6:04 AM, oliver <oliver.schoenborn at gmail.com> 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
>

Ah, thanks! I was not aware of these.
Then it makes no sense in adapting nose2pytest, I will try out these
suggestions.

Thanks a lot,
Thomas


More information about the pytest-dev mailing list