Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #62444

Re: Struggling with unittest discovery - how to structure my project test suite

From Serhiy Storchaka <storchaka@gmail.com>
Subject Re: Struggling with unittest discovery - how to structure my project test suite
Date 2013-12-20 19:41 +0200
References <8607d86e-8fcf-41ac-8da2-a8c137afe087@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.4440.1387561319.18130.python-list@python.org> (permalink)

Show all headers | View raw


20.12.13 16:47, Paul Moore написав(ла):
> What's the best way of structuring my projects so that:
>
> 1. I can run all the tests easily on demand.
> 2. I can run just the functional or unit tests when needed.

python -m unittest discover -s tests/functional
python -m unittest discover tests/functional

> 3. I can run individual tests (or maybe just individual test modules, I don't have so many tests yet that I know how detailed I'll need to get!) without too much messing (and certainly without changing any source files!)

python -m unittest discover -s tests/functional -p test_spam.py
python -m unittest discover tests/functional -p test_spam.py
python -m unittest discover tests/functional test_spam.py

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Struggling with unittest discovery - how to structure my project test suite Paul  Moore <p.f.moore@gmail.com> - 2013-12-20 06:47 -0800
  Re: Struggling with unittest discovery - how to structure my project test suite Serhiy Storchaka <storchaka@gmail.com> - 2013-12-20 19:41 +0200
    Re: Struggling with unittest discovery - how to structure my project test suite Paul  Moore <p.f.moore@gmail.com> - 2013-12-20 13:02 -0800
  Re: Struggling with unittest discovery - how to structure my project test suite Terry Reedy <tjreedy@udel.edu> - 2013-12-20 16:48 -0500

csiph-web