[QA] [Wikitech-l] Migrating away from nose (was 2017-11-01 Scrum of Scrums meeting notes)

Amir Sarabadani amir.sarabadani at wikimedia.de
Wed Nov 1 19:56:08 UTC 2017


Hey,
I did the migration, here's my notes:
- If you use "assert_equal" methods, the migration is easy, there is a
library that does the most cases for you:
https://github.com/pytest-dev/nose2pytest raise assertions would be a
problem but there is not lots of them left.
 - if you use eq_ (from nosetests.tools), you can simply replace them with
assert_equal and go to step one, but when I did, it also changed "def
__eq__" to "def __assert_eqal_" causing a mess (of course it does that, it
was very stupid of me)
 - The mark system in pytest is great (pytest.mark) Take advantage of it.

I also would be happy to lend a hand in migrating specially in review, just
ping me :)

Best

On 1 November 2017 at 19:34, Greg Grossmeier <greg at wikimedia.org> wrote:

> (adding in qa@ list)
>
> <quote name="Kunal Mehta" date="2017-11-01" time="11:15:42 -0700">
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA512
> >
> > Hi,
> >
> > On 11/01/2017 10:53 AM, Grace Gellerman wrote:
> > > === Scoring Platform === ** Converted our tests from nosetests to
> > > pytest (Anyone else making the transition?) *** nosetests is
> > > under-maintained *** python community is moving towards pytest ***
> > > converting our repos was pretty straightforward
> >
> > I didn't realize nose was in such a state :( They put a notice[1] on
> > their website, but I always skipped it.
> >
> > pytest[2] claims that it's compatible with nose out of the box - was
> > that the experience you had as well?
> >
> > Off the top of my head, Pywikibot, CI, and other miscellaneous
> > projects all use nose and should probably be migrated over to pytest.
> >
> > [1] https://nose.readthedocs.io/en/latest/#note-to-users
> > [2] https://docs.pytest.org/en/latest/
> >
> > - -- Legoktm
> > -----BEGIN PGP SIGNATURE-----
> >
> > iQJLBAEBCgA1FiEE+h6fmkHn9DUCyl1jUvyOe+23/KIFAln6D0gXHGxlZ29rdG1A
> > bWVtYmVyLmZzZi5vcmcACgkQUvyOe+23/KKbMw/+Nh/tGRagrvZgJqHBZakvvAYE
> > IHCUFPTUhfQ4cQ++oUqDpblAxR/FNO6BN2UQIrIh9gUylHCf/hwZ3BToC5GGPFY5
> > D9Sgi/ce9v5dp3IIvNZq/NZgb0DkityVkxWg8tiZJPwhJ6hTKw9LjaPl++ee9Po/
> > 940WYy7UQ7L/xwgy7rNJrViW0j4VD4mM7+PVvxPuv6rovOpa/H0VMbSlEuoXQYFG
> > P2DPJE1f8B9tn/xun6O6tveWdD7cdna2DVCXhFF+Tldnpa+XtOerE3P+YBA8Gp/+
> > sRJZuDjbCljM0GCzYYVR00klp8xDFQJXn+ELWaE1E3pAitZQdjb1A+xPmxagk1Up
> > ysqSc9nndVm6c59lkzdMcqz1myWyzLVho/RBmRVAAm37Wv7F7tvxHufuwWe8QO/I
> > sUJsRXkH7/TdsSzs8TU9YTZECE5QntTOM7gGgP4jPQgiwZrHob9si1jDUaQMuFoC
> > i8U9dylhrh280VAJj9LRaoRaSb48Ln6sZrCMdpCW8gt4UiRsUcSYCXbD45AgUS9Z
> > 3oPLMEpt+ESqDxJrBl9rgxyFZF19KhpeE3FPCvlAMZQShLZCAlRdDozczV4nFSHC
> > zhRmuRITmnDomf8prk7NwFSM0q601kTOgVqVZiBn9AY3Axvsa1TS1HM582y4rJ8U
> > O+eQbaSCyiI6HTE0lcc=
> > =4lTI
> > -----END PGP SIGNATURE-----
> >
> > _______________________________________________
> > Wikitech-l mailing list
> > Wikitech-l at lists.wikimedia.org
> > https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
> --
> | Greg Grossmeier            GPG: B2FA 27B1 F7EB D327 6B8E |
> | Release Team Manager            A18D 1138 8E47 FAC8 1C7D |
>
> _______________________________________________
> Wikitech-l mailing list
> Wikitech-l at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>



-- 
Amir Sarabadani
Software Engineer

Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Tel. (030) 219 158 26-0
http://wikimedia.de

Stellen Sie sich eine Welt vor, in der jeder Mensch an der Menge allen
Wissens frei teilhaben kann. Helfen Sie uns dabei!
http://spenden.wikimedia.de/

Wikimedia Deutschland – Gesellschaft zur Förderung Freien Wissens e. V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter
der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für
Körperschaften I Berlin, Steuernummer 27/029/42207.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.wikimedia.org/pipermail/qa/attachments/20171101/ebd4a695/attachment.html>


More information about the QA mailing list