Skip to main content

Assertion framework for python unit testing with a fluent API

Project description

assertpy
========

Dead simple assertions framework for unit testing in Python with a nice fluent
API that supports Python 2 and 3.

Usage
'''''

Just import the ``assert_that`` function, and away you go:

.. code-block:: python
from assertpy import assert_that

class TestSomething(object):
def test_something(self):
assert_that(1 + 2).is_equal_to(3)
assert_that('foobar').is_length(6).starts_with('foo').ends_with('bar')

Of course, ``assertpy`` works best with a python test runner
like `Nose <http://nose.readthedocs.org/>`_
or `pytest <http://pytest.org/latest/contents.html>`_.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

assertpy-0.8.tar.gz (7.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page