younit is a collection of helpers for the unittest module.
Helpers
I want to |
Helpers to Use |
|---|---|
Test coroutines |
@asyncio_test |
Mock out coroutines |
AsyncMock(), @asyncio_test |
Print the name of a test before running it |
@test_name |
Fail a test if it hangs |
@set_test_hang_alarm, @clear_test_hang_alarm, or @test_hang_alarm |
Close all threads associated with a test |
@close_all_threads |
Get It Now
$ pip install younit
Examples
Testing and mocking coroutines:
class MyTestCase(unittest.TestCase):
async def async_setUp(self):
pass
async def async_tearDown(self):
pass
@asyncio_test
async def test_this(self):
x = AsyncMock()
await x()
x.mock.assert_called_once()
Setting up test hang alarms:
class MyTestCase(unittest.TestCase):
@set_test_hang_alarm
def setUp(self):
pass
@clear_test_hang_alarm
def tearDown(self):
pass
More at https://younit.readthedocs.io
Project Links
License
MIT licensed. See the bundled LICENSE file for more details. ~
Changelog
0.1.0 (2017-07-21)
Initial release
Metadata
Release files for younit 0.1.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 | Provenance | Actions |
|---|---|---|---|---|
| younit-0.1.0.tar.gz | 4.8 kB | Without provenance | Details for younit-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| younit-0.1.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for younit-0.1.0-py2.py3-none-any.whl |
Total release size: 10.6 kB
Release files / younit-0.1.0.tar.gz
| Download URL | younit-0.1.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c5cae8add531fe6480efc0528a673ed7da7558267f60a13b4f625f778748e8e
|
|
BLAKE2b-256 checksum How to use checksums |
4ad4aa2d57ac1277c6446d11b04bb612b680cb5a11086dbd8e25c890128fe692
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / younit-0.1.0-py2.py3-none-any.whl
| Download URL | younit-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
1875cebc212f34d09ee4fad93b576702ffab343a88be1e6a707450d64daf819b
|
|
BLAKE2b-256 checksum How to use checksums |
e7ad4273d1381b9a8fdb7f76a2f562018ed1bbf0b28f6b5a9f26942d14b95b2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for younit 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.