Skip to main content

A collection of asserts for methods execution

Project description

PyPI version Downloads Downloads


A collection of asserts for testing performance of the methods.

List of asserts

assertMaximumExecutionTime(max_execution_time_seconds, func, *args, **kwargs)

assertMaximumMemoryUsage(max_memory_usage, func, *args, **kwargs)

How to use

Look at this sample :

from unittest import TestCase

from execution_assets import ExecutionTest

def my_method(input_parameter):

class MyTestCase(unittest.TestCase, ExecutionTest):
    def test_execution_time(self):
        self.assertMaximumExecutionTime(0.3, my_method, 'test_value')

    def test_memory_usage(self):
        self.assertMaximumMemoryUsage(12, my_method, 'test_value')

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 execution-asserts, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size execution_asserts-0.0.2-py3-none-any.whl (7.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page