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

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'messing': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:test': 0.09; 'unittest': 0.09; 'python': 0.11; 'modules,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject: \n ': 0.16; 'subject:project': 0.19; 'tests': 0.22; 'header:User-Agent:1': 0.23; 'certainly': 0.24; 'paul': 0.24; '(or': 0.24; 'source': 0.25; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'needed.': 0.30; 'run': 0.32; 'maybe': 0.34; 'subject:with': 0.35; 'test': 0.35; "i'll": 0.36; 'changing': 0.37; 'unit': 0.37; 'too': 0.37; 'easily': 0.37; '8bit%:86': 0.38; 'to:addr:python-list': 0.38; 'functional': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'discover': 0.82; 'demand.': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Serhiy Storchaka <storchaka@gmail.com>
Subject Re: Struggling with unittest discovery - how to structure my project test suite
Date Fri, 20 Dec 2013 19:41:40 +0200
References <8607d86e-8fcf-41ac-8da2-a8c137afe087@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host 78.111.186.63
User-Agent Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
In-Reply-To <8607d86e-8fcf-41ac-8da2-a8c137afe087@googlegroups.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4440.1387561319.18130.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1387561319 news.xs4all.nl 2837 [2001:888:2000:d::a6]:40899
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:62444

Show key headers only | 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