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
File details
Details for the file execution_asserts-0.0.3.tar.gz
.
File metadata
- Download URL: execution_asserts-0.0.3.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a3de7e68a135b871d66a602e59dd65adf34e62e56bff479365f16ae139363bd |
|
MD5 | f58cda5e60a5b8f72774d0c835b32ca8 |
|
BLAKE2b-256 | 89b62026b8023a4f57c8315866c364415ae6fbfc13c1491597925299df90b7e2 |
File details
Details for the file execution_asserts-0.0.3-py2-none-any.whl
.
File metadata
- Download URL: execution_asserts-0.0.3-py2-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8dba3b2d8ef420f66d0177f95db584a4ba86c99946e2a9477afe2358b1266380 |
|
MD5 | 28771beb4075298ccc9ae4c9b0eabcbf |
|
BLAKE2b-256 | 68abc825435b415aeabae11ce00df90db339586d829e57c5791a3a5f34472694 |