skip to navigation
skip to content

assertpy 0.11

Assertion library for python unit testing with a fluent API

Dead simple assertion library for python unit testing with a fluent API that supports Python 2 and 3.

Usage

Just import the assert_that function, and away you go:

from assertpy import assert_that

def test_something():
    assert_that(1 + 2).is_equal_to(3)
    assert_that('foobar').is_length(6).starts_with('foo').ends_with('bar')
    assert_that(['a', 'b', 'c']).contains('a').does_not_contain('x')

Of course, assertpy works best with a python test runner like pytest (our favorite) or Nose.

 
File Type Py Version Uploaded on Size
assertpy-0.11.tar.gz (md5) Source 2017-08-28 8KB