Fix coverage setup

This commit is contained in:
NateScarlet
2019-03-12 22:54:23 +08:00
parent 0bb4b18e1d
commit daa7f3b43c
6 changed files with 6 additions and 13 deletions

0
tests/__init__.py Normal file
View File

View File

@@ -1,16 +1,9 @@
"""pytest config"""
"""Tools for files. """
import os
import sys
__dirname__ = os.path.abspath(os.path.dirname(__file__))
def _file_path(*other):
return os.path.abspath(os.path.join(__dirname__, *other))
def pytest_configure(config):
sys.path.insert(0, _file_path('..'))
return config

View File

@@ -2,9 +2,10 @@
import json
import sys
from conftest import _file_path
from fetch_holidays import CustomJSONEncoder, DescriptionParser
from .filetools import _file_path
def _normalize(iterable):
return sorted(json.loads(json.dumps(list(iterable), cls=CustomJSONEncoder)),