Metadata-Version: 1.2
Name: asserts
Version: 0.9.1
Summary: Stand-alone Assertions
Home-page: https://github.com/srittau/python-asserts
Author: Sebastian Rittau
Author-email: srittau@rittau.biz
License: MIT
Description: Python Asserts
        ==============
        
        .. image:: https://img.shields.io/pypi/l/asserts.svg
           :target: https://pypi.python.org/pypi/asserts/
        .. image:: https://img.shields.io/github/release/srittau/python-asserts/all.svg
           :target: https://github.com/srittau/python-asserts/releases/
        .. image:: https://img.shields.io/pypi/v/asserts.svg
           :target: https://pypi.python.org/pypi/asserts/
        .. image:: https://travis-ci.org/srittau/python-asserts.svg?branch=master
           :target: https://travis-ci.org/srittau/python-asserts
        
        Stand-alone Assertions for Python
        
        This package provides a few advantages over the assertions provided by
        unittest.TestCase:
        
        * Can be used stand-alone, for example:
        
          * In test cases, not derived from TestCase.
          * In fake and mock classes.
          * In implementations as rich alternative to the assert statement.
        
        * PEP 8 compliance.
        * Custom stand-alone assertions can be written easily.
        * Arguably a better separation of concerns, since TestCase is responsible
          for test running only, if assertion functions are used exclusively.
        
        There are a few regressions compared to assertions from TestCase:
        
        * The default assertion class (AssertionError) can not be overwritten. This
          is rarely a problem in practice.
        * asserts does not support the addTypeEqualityFunc() functionality.
        
        Usage:
        
        >>> from asserts import assert_true, assert_equal, assert_raises
        >>> my_var = 13
        >>> assert_equal(13, my_var)
        >>> assert_true(True, msg="custom failure message")
        >>> with assert_raises(KeyError):
        ...     raise KeyError()
        
        Failure messages can be customized:
        
        >>> assert_equal(13, 14, msg_fmt="{got} is wrong, expected {expected}")
        Traceback (most recent call last):
          ...
        AssertionError: 14 is wrong, expected 13
        
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
