Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!81.171.88.16.MISMATCH!hq-usenetpeers!hq-usenetpeers.eweka.nl!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'url:pypi': 0.03; 'subject:ANN': 0.07; 'subject:released': 0.07; 'test,': 0.07; 'encode': 0.09; 'none)': 0.09; 'val': 0.09; 'python': 0.11; 'def': 0.12; 'changes': 0.15; 'fn)': 0.16; 'multipart': 0.16; 'new-style': 0.16; 'subject:library': 0.16; 'user-defined': 0.16; 'sender:addr:gmail.com': 0.17; 'fix': 0.17; 'library': 0.18; 'all,': 0.19; 'options.': 0.19; 'subject:] ': 0.20; '8bit%:5': 0.22; 'import': 0.22; 'to:name:python- list@python.org': 0.22; '>': 0.26; 'function': 0.29; 'testing': 0.29; 'message-id:@mail.gmail.com': 0.30; 'skip:( 20': 0.30; "skip:' 10": 0.31; 'class': 0.32; 'url:python': 0.33; 'received:google.com': 0.35; 'there': 0.35; 'url:org': 0.36; 'should': 0.36; 'skip:- 20': 0.37; 'skip:o 20': 0.38; 'subject:new': 0.38; 'to:addr:python-list': 0.38; 'skip:- 10': 0.38; 'subject:[': 0.39; 'to:addr:python.org': 0.39; 'release': 0.40; 'skip:\xc2 10': 0.60; 'skip:a 30': 0.61; 'new': 0.61; 'details.': 0.61; "'foo'": 0.84; '(s)': 0.84; 'maxlen': 0.84; 'minlen': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=PXnUAuSt42/GE9xkyGTimTba80Ttnoj3XhfGHhGMuGU=; b=n76VpxTfu5hypneHrAGSFHcy5lwtT7PkE7rcMZqHV5n7IftzWzUkbU2h493GeA0Oai wwF2TPfBFtkzspWEJaEMC577xTS/po5DtLlWfVt/uEJLTc7hSj/hcTwL6QfcWLv61c75 GptpYstdn4/DRvDcp8a/15BxY+O5f4HhMIrl6Cc4GOsnglkVkeW6WQ1NMA0yJvho0yeu j75L6up5/q4J5sKEktKTt5tQrojI+jlOQBgu19tOZEBRKJa66PXROEcD4BdBJhIbwDfm X0NkiZG9ajZfLF9Qa31sjI089+U+WCSxHGptlG7l8xSih+irpIK+os/htAlKj+8j8qX1 JG8g== MIME-Version: 1.0 X-Received: by 10.140.93.2 with SMTP id c2mr65171571qge.53.1404216842203; Tue, 01 Jul 2014 05:14:02 -0700 (PDT) Sender: kwatch@gmail.com Date: Tue, 1 Jul 2014 21:14:02 +0900 X-Google-Sender-Auth: xckwYN0JSFikfkctpAC21dMRo4Q Subject: [ANN] Oktest.py 0.15.0 released; a new-style testing library From: Makoto Kuwata To: "python-list@python.org" Content-Type: multipart/alternative; boundary=001a113a5f1e113a4904fd20b62c X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 133 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1404216850 news.xs4all.nl 2883 [2001:888:2000:d::a6]:40048 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 9838 X-Received-Body-CRC: 4003508031 Xref: csiph.com comp.lang.python:73785 --001a113a5f1e113a4904fd20b62c Content-Type: text/plain; charset=UTF-8 Hi all, I released Oktest.py 0.15.0. * PyPI: https://pypi.python.org/pypi/Oktest/ * Document: http://www.kuwata-lab.com/oktest/oktest-py_users-guide.html What is Oktest.py? ------------------ Oktest.py is a new-style testing library for Python. Example:: from oktest import test, ok, NG class FooTest(unittest.TestCase): @test("1 + 1 should be 2") def _(self): ok (1+1) == 2 # same as assertEqual(2, 1+1) @test("other examples") def _(self): ok (s) == 'foo' # same as assertEqual(s, 'foo') ok (s) != 'foo' # same as assertNotEqual(s, 'foo') ok (n) > 0 # same as assertTrue(n > 0) ok (fn).raises(Error) # same as assertRaises(Error, fn) ok ([]).is_a(list) # same as assertTrue(isinstance([], list)) NG ([]).is_a(tuple) # same as assertTrue(not isinstance([], tuple)) ok ('A.txt').is_file() # same as assertTrue(os.path.isfile('A.txt')) NG ('A.txt').is_dir() # same as assertTrue(not os.path.isdir('A.txt')) See http://www.kuwata-lab.com/oktest/oktest-py_users-guide.html for details. Changes in this release ----------------------- * [enhance] oktest.web.WSGITest class supports multipart form data. * [enhance] oktest.web.WSGITest class supports 'Cookie' and 'Set-Cookie'. * [enhance] New assertion methods. ok (xs).all(lambda x: x is None) # ok when all items in xs are None ok (xs).any(lambda x: x is None) # ok when there is None in xs ok (x).between(minval, maxval) # ok when minval <= x <= maxval ok (xs).length([minlen, maxlen]) # ok when minlen <= len(xs) <= maxlen ok (dictionary).has_key('key') # ok when dictinary has key ok (dictionary).has_item('key','val') # ok when dictionary has key an val * [enhance] New utility function 'options_of()' to get user-defined options. * [bugfix] oktest.web.WSGITest now works on Python 3.4. * [bugfix] fix oktest.web.WSGITest class to encode urlpath when multibyte. See http://www.kuwata-lab.com/oktest/oktest-py_CHANGES.txt for details. -- regards, makoto kuwata --001a113a5f1e113a4904fd20b62c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,

I released Oktest.py= 0.15.0.

* Docume= nt: =C2=A0http://www.kuwata-lab.com/oktest/oktest-py_users-guide.html


What is Oktest.py?
-----------= -------

Oktest.py is a new-style testing library f= or Python.
Example::

=C2=A0 =C2=A0 from = oktest import test, ok, NG
=C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 class FooTest(unittest.Tes= tCase):
=C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0= @test("1 + 1 should be 2")
=C2=A0 =C2=A0 =C2=A0 =C2=A0d= ef _(self):
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ok (1+1) =3D=3D 2 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# same as assertEqual(2, 1+1)
=C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0@test("o= ther examples")
=C2=A0 =C2=A0 =C2=A0 =C2=A0def _(self):
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ok (s) =3D=3D 'foo' =C2=A0= =C2=A0 =C2=A0 =C2=A0# same as assertEqual(s, 'foo')
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ok (s) !=3D 'foo' =C2=A0 =C2=A0 =C2= =A0 =C2=A0# same as assertNotEqual(s, 'foo')
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ok (n) > 0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 # same as assertTrue(n > 0)
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 ok (fn).raises(Error) =C2=A0# same as assertRaises(Er= ror, fn)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ok ([]).is_a(list) = =C2=A0 =C2=A0 # same as assertTrue(isinstance([], list))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 NG ([]).is_a(tuple) =C2=A0 =C2=A0# = same as assertTrue(not isinstance([], tuple))
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 ok ('A.txt').is_file() # same as assertTrue(os.pa= th.isfile('A.txt'))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 NG= ('A.txt').is_dir() =C2=A0# same as assertTrue(not os.path.isdir(&#= 39;A.txt'))



Changes in t= his release
-----------------------

* [enhance] oktest.we= b.WSGITest class supports multipart form data.
* [enhance] oktest= .web.WSGITest class supports 'Cookie' and 'Set-Cookie'.
* [enhance] New assertion methods.
=C2=A0 =C2=A0 ok (xs).all= (lambda x: x is None) =C2=A0 =C2=A0 =C2=A0 # ok when all items in xs are No= ne
=C2=A0 =C2=A0 ok (xs).any(lambda x: x is None) =C2=A0 =C2=A0 = =C2=A0 # ok when there is None in xs
=C2=A0 =C2=A0 ok (x).between(minval, maxval) =C2=A0 =C2=A0 =C2=A0 =C2=A0 # = ok when minval <=3D x <=3D maxval
=C2=A0 =C2=A0 ok (xs).len= gth([minlen, maxlen]) =C2=A0 =C2=A0 =C2=A0 # ok when minlen <=3D len(xs)= <=3D maxlen
=C2=A0 =C2=A0 ok (dictionary).has_key('key= 9;) =C2=A0 =C2=A0 =C2=A0 =C2=A0 # ok when dictinary has key
=C2=A0 =C2=A0 ok (dictionary).has_item('key','val') = =C2=A0# ok when dictionary has key an val
* [enhance] New utility= function 'options_of()' to get user-defined options.
* [= bugfix] oktest.web.WSGITest now works on Python 3.4.
* [bugfix] fix oktest.web.WSGITest class to encode urlpath when multib= yte.



--
regards,
makoto k= uwata

--001a113a5f1e113a4904fd20b62c--