Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #63765
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <kwatch@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; '+++': 0.03; 'url:pypi': 0.03; 'json': 0.07; 'subject:ANN': 0.07; 'subject:released': 0.07; 'callback': 0.09; 'decorator': 0.09; 'enhancements': 0.09; 'unified': 0.09; 'unittest': 0.09; 'def': 0.12; 'changes': 0.15; "'w')": 0.16; '+1,3': 0.16; '-1,3': 0.16; 'content-type': 0.16; 'easy_install': 0.16; 'highlight': 0.16; 'new-style': 0.16; 'subject:library': 0.16; '\xa0def': 0.16; 'sender:addr:gmail.com': 0.17; 'library': 0.18; 'skip:f 30': 0.19; 'subject:] ': 0.20; '8bit%:5': 0.22; 'install': 0.23; 'error': 0.23; 'case.': 0.24; 'header': 0.24; '---': 0.24; 'testing': 0.29; '8bit%:3': 0.30; 'skip:( 40': 0.30; 'skip:@ 10': 0.30; 'message- id:@mail.gmail.com': 0.30; 'skip:( 20': 0.30; 'code': 0.31; "skip:' 10": 0.31; 'assert': 0.31; 'object.': 0.31; 'skip:( 50': 0.31; "user's": 0.31; 'file': 0.32; 'url:python': 0.33; 'actual': 0.34; 'skip:s 30': 0.35; 'test': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'version': 0.36; 'false': 0.36; 'hi,': 0.36; 'url:org': 0.36; 'reports': 0.37; 'skip:- 20': 0.37; 'expected': 0.38; 'subject:new': 0.38; 'skip:& 10': 0.38; 'to:addr :python-list': 0.38; 'skip:- 10': 0.38; 'previous': 0.38; 'skip:& 20': 0.39; 'subject:[': 0.39; 'delete': 0.39; 'to:addr:python.org': 0.39; 'called': 0.40; '8bit%:6': 0.40; 'release': 0.40; 'remove': 0.60; 'new': 0.61; 'temporary': 0.65; 'registers': 0.68; 'skip:r 30': 0.69; 'x):': 0.84; 'fun!': 0.93 |
| 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=S66EWNTOBuwo96KfB42tpr5u8Okbsi1OaQqgLPz+sNs=; b=moxNQihiCw2oFCsczKLP7I2Gf9eLdWOTCPPVbnY/W8J1q8IYQRv0tiQx4V1hODHlWc u390cBQYvsqJtIqeWqoOWLpHcJw3K5UK6Kz4dbnbW+w3gvPmZKUx9uCmyRDlw+lYOj4a HTDCy/4+wurhmAP00MpsvpPjJtN3rIKaPXJaBzubdzJ2oa4FJnM/0ZdQ2evT2P8j6ECO xfHS6ERDvNAWWG+n/o5lTq4viaUfev+ofFETATFYwCt4QDz0MKbGvcfGjzt1jh5baIcF x1cINVZj24Tm9MyaqBTXvFqFtbBIYBpdYGxPQzwkKF2kEUJrYYY/GiMK4WR1wEtWz4vf OU2Q== |
| MIME-Version | 1.0 |
| X-Received | by 10.49.39.165 with SMTP id q5mr28773297qek.48.1389530287204; Sun, 12 Jan 2014 04:38:07 -0800 (PST) |
| Sender | kwatch@gmail.com |
| Date | Sun, 12 Jan 2014 21:38:07 +0900 |
| X-Google-Sender-Auth | nj4ddDYF-VsOti4h6ReZ78UmB1w |
| Subject | [ANN] Oktest.py 0.12.0 released - a new-style testing library |
| From | Makoto Kuwata <kwa@kuwata-lab.com> |
| To | python-list@python.org |
| Content-Type | multipart/alternative; boundary=047d7bd6b4922c6f8604efc53bd7 |
| 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.5364.1389530289.18130.python-list@python.org> (permalink) |
| Lines | 174 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1389530289 news.xs4all.nl 2844 [2001:888:2000:d::a6]:47643 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:63765 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
Hi,
I released Oktest 0.12.0.
https://pypi.python.org/pypi/Oktest/
Oktest is a new-style testing library for Python.
## unittest
self.assertEqual(x, y)
self.assertNotEqual(x, y)
self.assertGreaterEqual(x, y)
self.assertIsInstance(obj, cls)
self.assertRegexpMatches(text, rexp)
## Oktest.py
ok (x) == y
ok (x) != y
ok (x) >= y
ok (obj).is_a(cls)
ok (text).match(rexp)
Install
$ easy_install oktest
User's Guide
http://www.kuwata-lab.com/oktest/oktest-py_users-guide.html
Changes
http://www.kuwata-lab.com/oktest/oktest-py_CHANGES.txt
Highlight on this release
-------------------------
This release contains new and important enhancements.
* [enhance] `ok (actual) == expected' reports unified diff.
Example::
AssertionError:
--- expected
+++ actual
@@ -1,3 +1,3 @@
{'email': 'haruhi@sos-brigade.org',
- 'gender': 'Female',
+ 'gender': 'female',
'username': 'Haruhi'}
* [enhance] @at_end decorator registers callback which is called
at end of test case. ::
@test("example to remove temporary file automatically")
def _(self):
## create dummy file
with open('dummy.txt', 'w') as f:
f.write("blablabla")
## register callback to delete dummy file at end of test case
@at_end
def _():
os.unlink(tmpfile)
## do test
with open(tmpfile) as f:
ok (f.read()) == "blablabla"
* [enhance] New assertions for WebOb/Werkzeug response object. ::
ok (resp).is_response(200) # status code
ok (resp).is_response((302, 303)) # status code
ok (resp).is_response('200 OK') # status line
ok (resp).is_response(200, 'image/jpeg') # content-type
ok (resp).is_response(200, re.compile(r'^image/(jpeg|png|gif)$'))
ok (resp).is_response(302).header("Location", "/") # header
ok (resp).is_response(200).json({"status": "OK"}) # json data
ok (resp).is_response(200).body("<h1>Hello</h1>") # response body
ok (resp).is_response(200).body(re.compile("<h1>.*?</h1>"))
* [bugfix] @todo decorator now supports fixture injection. ::
@test('example')
@todo # error on previous version but not on this release
def _(self, x):
assert False
You can see all enhancements and changes. See
http://www.kuwata-lab.com/oktest/oktest-py_CHANGES.txt
Have fun!
--
regards,
makoto kuwata
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
[ANN] Oktest.py 0.12.0 released - a new-style testing library Makoto Kuwata <kwa@kuwata-lab.com> - 2014-01-12 21:38 +0900 Re: [ANN] Oktest.py 0.12.0 released - a new-style testing library Roy Smith <roy@panix.com> - 2014-01-12 08:02 -0500
csiph-web