Skip to main content

a collection of helpers for the unittest module

Project description

younit is a collection of helpers for the unittest module.


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


Testing and mocking coroutines:

class MyTestCase(unittest.TestCase):
    async def async_setUp(self):

    async def async_tearDown(self):

    async def test_this(self):
        x = AsyncMock()
        await x()

Setting up test hang alarms:

class MyTestCase(unittest.TestCase):
    def setUp(self):

    def tearDown(self):


MIT licensed. See the bundled LICENSE file for more details. ~


0.1.0 (2017-07-21)

  • Initial release

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for younit, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size younit-0.1.0-py2.py3-none-any.whl (5.8 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size younit-0.1.0.tar.gz (4.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page