nucypher/tests/run_tests.py

24 lines
579 B
Python
Raw Normal View History

2022-11-16 13:13:53 +00:00
2021-05-11 17:55:13 +00:00
from pathlib import Path
import maya
import pytest
class NucypherPytestRunner:
2021-05-11 17:55:13 +00:00
TEST_PATH = Path('tests') / 'cli'
PYTEST_ARGS = ['--verbose', TEST_PATH]
def pytest_sessionstart(self):
print("*** Running Nucypher CLI Tests ***")
self.start_time = maya.now()
def pytest_sessionfinish(self):
duration = maya.now() - self.start_time
print("*** Nucypher Test Run Report ***")
print("""Run Duration ... {}""".format(duration))
def run():
pytest.main(NucypherPytestRunner.PYTEST_ARGS, plugins=[NucypherPytestRunner()])