Simple meta package to easily get unittest2 functionality in both Python 2 and Python 3.
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.
Release files for unittest2six 0.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| unittest2six-0.0.0.tar.gz | 2.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| unittest2six-0.0.0-cp27-none-macosx_10_4_x86_64.whl | CPython 2.7 | none | macOS 10.4+ x86-64 | Details |
Total release size: 6.3 kB
Release files / unittest2six-0.0.0.tar.gz
| Download URL | unittest2six-0.0.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30e888e15d997a85ecd95732088a7f79bb35cbae0887a689b0f490863cc2fb60
|
|
BLAKE2b-256 checksum How to use checksums |
ee66f21478497e00837737ea490faa9cb37f74a9709c2c789750a8b7beb4b6c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / unittest2six-0.0.0-cp27-none-macosx_10_4_x86_64.whl
| Download URL | unittest2six-0.0.0-cp27-none-macosx_10_4_x86_64.whl |
|---|---|
| Size | 3.4 kB |
| Tags | CPython 2.7 macOS 10.4+ x86-64 |
|
SHA-256 checksum How to use checksums |
f6f9864c7fa10ba754769b7ad5eae8afbec87855773b8f34943421973a74e84a
|
|
BLAKE2b-256 checksum How to use checksums |
0673bf12feafb34dceb6c2a587ed6eadfd3b431d8d236abf9b13d8838a332dd5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |