Something went wrong on our end
-
Nick Bearson authored
add a test suite to the repo via pytest, and fix some minor bugs in _minute_gridder.py uncovered by the test rewrite
Nick Bearson authoredadd a test suite to the repo via pytest, and fix some minor bugs in _minute_gridder.py uncovered by the test rewrite
conftest.py 648 B
"""
Shared config for all tests
"""
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), 'lib'))
import pytest
import shutil
import pprint
from glob import glob
@pytest.fixture(autouse=True)
def run_before_and_after_tests(tmp_path):
"""Fixture to execute asserts before and after a test is run"""
# Setup: fill with any logic you want
os.chdir(tmp_path)
print(os.getcwd())
yield # this is where the testing happens
# print the current directory's list of files
pp = pprint.PrettyPrinter()
pp.pprint(glob("*"))
# Teardown : fill with any logic you want
shutil.rmtree(tmp_path)