ANN: Oktest 0.2.1 released - a new style testing library.

K

kwatch

Hi,

I released Oktest 0.2.1.

homepage: http://packages.python.org/Oktest/
download: http://pypi.python.org/pypi/Oktest/
repository: http://bitbucket.org/kwatch/oktest/

Oktest is a new-style testing library for Python.

from oktest import ok
ok (x) > 0 # same as assert_(x > 0)
ok (s) == 'foo' # same as assertEqual(s, 'foo')
ok (s) != 'foo' # same as assertNotEqual(s, 'foo')
ok (f).raises(ValueError) # same as assertRaises(ValueError, f)
ok (u'foo').is_a(unicode) # same as assert_(isinstance(u'foo',
ode))
not_ok (u'foo').is_a(int) # same as assert_(not
isinstance(u'foo', )
ok ('A.txt').is_file() # same as
assert_(os.path.isfile('A.txt'))
not_ok ('A.txt').is_dir() # same as assert_(not
os.path.isdir('A.txt'))

You can use ok() instead of 'assertXxx()' in unittest.

Oktest requires Python 2.3 or later. Oktest is ready for Python 3.

NOTICE!! Oktest is a young project and specification may change in the
future.

See http://packages.python.org/Oktest/ for details.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top