2022-11-16 13:13:53 +00:00
|
|
|
|
2021-05-11 17:55:13 +00:00
|
|
|
from pathlib import Path
|
2018-11-24 05:12:06 +00:00
|
|
|
|
|
|
|
import maya
|
|
|
|
import pytest
|
|
|
|
|
|
|
|
|
|
|
|
class NucypherPytestRunner:
|
2021-05-11 17:55:13 +00:00
|
|
|
TEST_PATH = Path('tests') / 'cli'
|
2018-11-24 05:13:11 +00:00
|
|
|
PYTEST_ARGS = ['--verbose', TEST_PATH]
|
2018-11-24 05:12:06 +00:00
|
|
|
|
|
|
|
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()])
|