A collection of asserts for methods execution
Project description
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
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
Built Distribution
Close
Hashes for execution_asserts-0.0.3-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8dba3b2d8ef420f66d0177f95db584a4ba86c99946e2a9477afe2358b1266380 |
|
MD5 | 28771beb4075298ccc9ae4c9b0eabcbf |
|
BLAKE2b-256 | 68abc825435b415aeabae11ce00df90db339586d829e57c5791a3a5f34472694 |