Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/msabramo/unittest2six
Meta-package for unittest2 functionality on both Python 2 and Python 3
https://github.com/msabramo/unittest2six
Last synced: about 1 month ago
JSON representation
Meta-package for unittest2 functionality on both Python 2 and Python 3
- Host: GitHub
- URL: https://github.com/msabramo/unittest2six
- Owner: msabramo
- Created: 2014-05-13T17:13:18.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-09T05:36:36.000Z (almost 9 years ago)
- Last Synced: 2024-11-14T10:31:33.556Z (about 2 months ago)
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
unittest2six
============.. image:: https://secure.travis-ci.org/msabramo/unittest2six.png
:target: http://travis-ci.org/msabramo/unittest2sixSimple meta package to easily get unittest2_ functionality in both Python 2 and
Python 3.**Note: You probably don't need this package anymore**. The unittest2_ package supports Python 3 since version 0.6.0 (released 2014-10-28).
This provides stuff that was added to unittest in the Python 2.7 stdlib and
backported to Python 2.6 with unittest2_. e.g.:- ``assertIn``/``assertNotIn``
- ``assertIsInstance``/``assertNotIsInstance``
- ``assertRaises`` as a context manager
- etc...This module has no code. It's just a meta package that ``install_requires`` the
proper dependency:- On Python 2, this ``install_requires`` unittest2_.
- On Python 3, this ``install_requires`` unittest2py3k_.This is handy to have one dependency that you can use on both Python 2 and
Python 3 and not have to have separate pip requirements files and tox targets.Compatibility
-------------Results from Tox_::
$ make test
...
[TOX] py25: commands succeeded
[TOX] py26: commands succeeded
[TOX] py27: commands succeeded
[TOX] py30: commands succeeded
[TOX] py31: commands succeeded
[TOX] py32: commands succeeded
[TOX] congratulations :)
...
py26: commands succeeded
py27: commands succeeded
py32: commands succeeded
py33: commands succeeded
py34: commands succeeded
pypy: commands succeeded
congratulations :)See also
--------- https://github.com/msabramo/unittest2/pull/1 -- This is a GitHub pull request
for changes that I proposed to make to unittest2 to make it work in Python 3... _unittest2: https://pypi.python.org/pypi/unittest2
.. _unittest2py3k: https://pypi.python.org/pypi/unittest2py3k
.. _Tox: http://tox.testrun.org/