Metadata-Version: 2.4
Name: testy
Version: 0.4
Summary: Python unittest helpers adapted from Testify
Home-page: https://github.com/jimr/testy
Author: James Rutherford
Author-email: jim@jimr.org
Keywords: testing,unittest
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Other Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.5
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.0
Classifier: Programming Language :: Python :: 3.1
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Testing
Provides: testy
License-File: LICENSE.txt
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: home-page
Dynamic: keywords
Dynamic: license-file
Dynamic: provides
Dynamic: summary

=====
Testy
=====

All the assertions from Testify_ but cleaned up a bit & with added py3k support.

.. _Testify: https://github.com/Yelp/Testify

Should work with Python 2.5-3.3 and pypy 1.9. To make sure it will work for you::

    python setup.py test

There are no dependencies.


Installation
============

From source::

    pip install -e ./

or::

    python setup.py install

Or you can just direct from the cheese shop::

    pip install testy


Example Usage
=============

.. code-block:: python

    import re
    import unittest

    from testy.assertions import assert_equal, assert_raises, assert_match_regex

    class MyTestCase(unittest.TestCase):
        def setUp(self):
            self.x = 1

        def test_x(self):
            assert_equal(self.x, 1)

        def test_exception(self):
            with assert_raises(TypeError):
                raise TypeError("Call some code you expect to fail here.")

        def test_pattern(self):
            pattern = re.compile('\w')
            assert_match_regex(pattern, 'abc')

        def tearDown(self):
            self.x = None


    if __name__ == "__main__":
        unittest.main()

