My preference is to write the tests with the unittest module because that is the standard library. Then one has the option of running the tests with unittest.main(), nose, or py.test. I am not in a position to say which test runner is best, I am mostly experienced with nose. The functionality I have appreciated is integration with the coverage tool and the debugger. If there is a convincing argument for py.test I am prepared to reevaluate my habits.
Cheers, Olav On Thu, Feb 11, 2016 at 1:58 AM, Luiz Irber <[email protected]> wrote: > Also, since we like pytest so much, they will have a sprint in June > and set up a indiegogo campaign to help covering costs: > http://pytest.org/latest/announce/sprint2016.html > > On Wed, Feb 10, 2016 at 3:56 PM, Matt Davis <[email protected]> wrote: > > +1 for pytest, it's one of my favorite Python libraries. > > > > On Wed, Feb 10, 2016 at 3:40 PM Luiz Irber <[email protected]> wrote: > >> > >> Hypothesis is quite cool, but it is not a test runner (and it does > >> take way more thinking about tests than traditional unit tests). It > >> does work very well with pytest and nose, tho. > >> > >> Some pointers for hypothesis: > >> https://github.com/dib-lab/khmer/issues/990 > >> > >> > https://github.com/luizirber/khmer/blob/feature/hypothesis/tests/test_hypothesis.py > >> > >> > >> > >> On Wed, Feb 10, 2016 at 3:36 PM, C. Titus Brown <[email protected]> > >> wrote: > >> > Hypothesis is about property-based testing, and only partially > overlaps > >> > with > >> > standard testing functionality. > >> > > >> > Luiz Irber in my lab gave a presentation a few weeks back on applying > it > >> > to khmer: > >> > > >> > > >> > > https://docs.google.com/presentation/d/1GIrb9pMvfto-reHc_85yqnlSrOFexsgGwue1YPrx5H0/edit > >> > > >> > best, > >> > --titus > >> > > >> > On Wed, Feb 10, 2016 at 06:33:34PM -0500, Maxime Boissonneault wrote: > >> >> I have heard much good about Hypothesis > >> >> (https://hypothesis.readthedocs.org/en/latest/). > >> >> > >> >> > >> >> > https://www.reddit.com/r/programming/comments/2zw41r/hypothesis_is_an_advanced_quickcheck_style/ > >> >> > >> >> Maxime > >> >> > >> >> Le 2016-02-10 18:24, W. Trevor King a ?crit : > >> >>> On Wed, Feb 10, 2016 at 02:07:20PM -0800, Steven Haddock wrote: > >> >>>> I think this has been discussed before (maybe even raised by me?), > >> >>>> but what is the current favorite test library for python, since > that > >> >>>> nose and nose2 are not being maintained. > >> >>>> ? > >> >>>> A priority would be minimal boilerplate required? > >> >>> Python's builtin unittest supports automatic test discovery since > v3.2 > >> >>> [1], and subtests (new in v3.4 [2]) address my most common > boilerplate > >> >>> concerns from Python 2. I don't find defining TestCase subclasses > to > >> >>> be that big a drag ;). > >> >>> > >> >>> Cheers, > >> >>> Trevor > >> >>> > >> >>> [1]: > >> >>> > https://docs.python.org/3/library/unittest.html#unittest-test-discovery > >> >>> [2]: > >> >>> > https://docs.python.org/3/library/unittest.html#distinguishing-test-iterations-using-subtests > >> >>> > >> >>> > >> >>> > >> >>> _______________________________________________ > >> >>> Discuss mailing list > >> >>> [email protected] > >> >>> > >> >>> > http://lists.software-carpentry.org/mailman/listinfo/discuss_lists.software-carpentry.org > >> >> > >> >> > >> >> -- > >> >> --------------------------------- > >> >> Maxime Boissonneault > >> >> Analyste de calcul - Calcul Qu?bec, Universit? Laval > >> >> Pr?sident - Comit? de coordination du soutien ? la recherche de > Calcul > >> >> Qu?bec > >> >> Team lead - Research Support National Team, Compute Canada > >> >> Instructeur Software Carpentry > >> >> Ph. D. en physique > >> >> > >> > > >> >> _______________________________________________ > >> >> Discuss mailing list > >> >> [email protected] > >> >> > >> >> > http://lists.software-carpentry.org/mailman/listinfo/discuss_lists.software-carpentry.org > >> > > >> > -- > >> > C. Titus Brown, [email protected] > >> > > >> > _______________________________________________ > >> > Discuss mailing list > >> > [email protected] > >> > > >> > > http://lists.software-carpentry.org/mailman/listinfo/discuss_lists.software-carpentry.org > >> > >> _______________________________________________ > >> Discuss mailing list > >> [email protected] > >> > >> > http://lists.software-carpentry.org/mailman/listinfo/discuss_lists.software-carpentry.org > > _______________________________________________ > Discuss mailing list > [email protected] > > http://lists.software-carpentry.org/mailman/listinfo/discuss_lists.software-carpentry.org >
_______________________________________________ Discuss mailing list [email protected] http://lists.software-carpentry.org/mailman/listinfo/discuss_lists.software-carpentry.org
