Skip to main content

Assertion framework for python unit testing with a fluent API

Project description

Dead simple assertions framework for unit testing in Python with a nice fluent API.

Usage

Just import the assert_that function, and away you go:

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 or pytest.

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.5.tar.gz (5.7 kB view details)

Uploaded Source

File details

Details for the file assertpy-0.5.tar.gz.

File metadata

  • Download URL: assertpy-0.5.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for assertpy-0.5.tar.gz
Algorithm Hash digest
SHA256 f9710078c3fc23943596ba1427f822296d311c04d3887018bcd3e07039a32aa4
MD5 be9ad0c2c7ea1fa4daf0b93e7d497dce
BLAKE2b-256 c28f0cc3fefb1956a1b504cfa12dbd457ffc4730cb567fd5683ff21493154367

See more details on using hashes here.

Supported by

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