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


Groups > comp.lang.python.announce > #1355

unittest_expander 0.3.0 released

Path csiph.com!usenet.pasdenom.info!gegeweb.org!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <zuo@kaliszewski.net>
X-Original-To python-announce-list@python.org
Delivered-To python-announce-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'example:': 0.03; 'url:pypi': 0.03; 'subject:released': 0.07; "'')": 0.09; 'tests,': 0.09; 'unittest': 0.09; 'url:github': 0.09; 'python': 0.11; 'def': 0.12; 'jan': 0.12; 'foo,': 0.16; 'homepage:': 0.16; 'library).': 0.16; 'param': 0.16; 'subject:skip:u 10': 0.16; 'to:addr:python- announce-list': 0.16; 'library': 0.18; 'import': 0.22; 'fraction': 0.24; 'cheers,': 0.24; 'external': 0.29; 'label': 0.30; 'especially': 0.30; 'assert': 0.31; 'class': 0.32; 'url:python': 0.33; 'announce': 0.33; 'charset:us-ascii': 0.36; 'url:org': 0.36; 'unit': 0.37; 'does': 0.39; 'to:addr:python.org': 0.39; 'release': 0.40; 'skip:u 10': 0.60; 'skip:t 30': 0.61; 'simple': 0.61; 'received:212.227.17': 0.68; 'received:89.73': 0.84; 'received:89': 0.85; 'url:latest': 0.91
Date Sun, 17 Aug 2014 00:53:33 +0200
From Jan Kaliszewski <zuo@kaliszewski.net>
To python-announce-list@python.org
Subject unittest_expander 0.3.0 released
X-Mailer Claws Mail 3.8.1 (GTK+ 2.24.17; x86_64-pc-linux-gnu)
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:D3BL5mrohL4diVFryhf9RGI8F7QBS20Kmfn4fw1ZFGk il9vumLpho3gixeXPknr1CFHaDSwWDKutYy40yzijHVC/+Dp3W BTpZAw1BFl8WoQqRsQW0HRD6gawXX3ma+WwNZJcj/mpjhBQTI+ pdARLE5MLpsg1qnkNFp0omIB4Df4IV73KxG5pGRjJxQDiIPmNA jWk/ZYVJGGQuMzzVBnkMoG5yT9ZW9ZAbef3iMZH1QoTqfMPKoR FX9lZcNsRCJXQpP/eOMzuHsj8B9XM32XF7VypsRwn0ocAVU6MC 4quET1vhPt/bfafwX2cwezsr20gO0HyOGaf8eWrl/SzaBhLtnl mLPgOhDqkQGdoQ9t3p98=
X-UI-Out-Filterresults notjunk:1;
X-Mailman-Approved-At Sun, 17 Aug 2014 08:20:41 +0200
X-BeenThere python-announce-list@python.org
X-Mailman-Version 2.1.15
Precedence list
Reply-To python-list@python.org
List-Id Announcement-only list for the Python programming language <python-announce-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-announce-list>, <mailto:python-announce-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-announce-list/>
List-Post <mailto:python-announce-list@python.org>
List-Help <mailto:python-announce-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-announce-list>, <mailto:python-announce-list-request@python.org?subject=subscribe>
Approved python-announce-list@python.org
Newsgroups comp.lang.python.announce
Message-ID <mailman.13060.1408256442.18130.python-announce-list@python.org> (permalink)
Lines 42
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1408256442 news.xs4all.nl 2974 [2001:888:2000:d::a6]:47161
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python.announce:1355

Show key headers only | View raw


I am pleased to announce the release of unittest_expander 0.3.0.

unittest_expander is a MIT-licensed Python library that provides
flexible and easy-to-use tools to parameterize your unit tests,
especially those based on unittest.TestCase.

The library is compatibile with Python 2.6, 2.7, 3.2, 3.3 and 3.4, and
does not depend on any external packages (uses only the Python standard
library).

Simple usage example:

    import unittest
    from unittest_expander import expand, foreach, param

    @expand
    class TestSomething(unittest.TestCase):
        @foreach(
            'Foo',
            ('Foo', 43),
            param('Foo', spam=44),
            param(foo='Bar', spam=45).label('with bar'),
            empty=param(foo='', spam=46),
        )
        def test_it(self, foo, spam=42, label=None):
            assert foo in ('Foo', 'Bar', '')
            assert 42 <= spam <= 46
            if label == 'with bar':
                assert foo == 'Bar' and spam == 45
            if label == 'empty':
                assert foo == '' and spam == 46

This is only a fraction of the possibilities the unittest_expander
library provides.

Homepage: https://github.com/zuo/unittest_expander
PyPI: https://pypi.python.org/pypi/unittest_expander
Documentation: http://unittest-expander.readthedocs.org/en/latest/


Cheers,
Jan Kaliszewski (zuo)

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


Thread

unittest_expander 0.3.0 released Jan Kaliszewski <zuo@kaliszewski.net> - 2014-08-17 00:53 +0200

csiph-web