Skip to main content

A collection of asserts for methods execution

Project description

PyPI version PyPI download month PyPI pyversions

execution-asserts

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 :

import unittest

from execution_assets import ExecutionTest

def my_method(input_parameter):
    pass


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.3
Filename, size File type Python version Upload date Hashes
Filename, size execution_asserts-0.0.3.tar.gz (1.8 kB) File type Source Python version None Upload date Hashes View
Filename, size execution_asserts-0.0.3-py2-none-any.whl (7.5 kB) File type Wheel Python version py2 Upload date Hashes View

Supported by

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