"Backport of unittest and unittest.mock"
Project description
A backport of Python 3.14.x unittest and unittest.mock to older versions of Python, under the backports namespace.
Usage
from backports import unittest
def hello(greetee='world'):
return 'Hello {greetee}!'.format(greetee=greetee)
class HelloTest(unittest.TestCase)
def test_greeting(self):
# assertStartsWith() added in Python 3.14
self.assertStartsWith(hello(), 'Hello')
Installation
Use
pip install backports.unittest
or
uv pip install backports.unittest
Compatibility
Python 3.10 - 3.14 are tested, using backports of the CPython’s own test suite.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
backports_unittest-0.0.1.tar.gz
(271.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file backports_unittest-0.0.1.tar.gz.
File metadata
- Download URL: backports_unittest-0.0.1.tar.gz
- Upload date:
- Size: 271.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c29115983cb889cce4d5f823529865a634081c3e59f85181e1d60c12c47c570
|
|
| MD5 |
8a7de6c405cab5ed46469ad212ff397c
|
|
| BLAKE2b-256 |
22e80187129ae5cf5e4b6466fd2fcabbda7b5b327a5ddd31f21b11b37e2af8f0
|
File details
Details for the file backports_unittest-0.0.1-py3-none-any.whl.
File metadata
- Download URL: backports_unittest-0.0.1-py3-none-any.whl
- Upload date:
- Size: 170.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29529a60dd6a61467a17a4db2a964928abd35df0f98337312a64b15b2835087c
|
|
| MD5 |
c6ed7f1d489ab0456196baa4335500b9
|
|
| BLAKE2b-256 |
369fb46ef892f507abebca8da6680ddf6e8d1a2b0db01a916e9419ddaac1e990
|