Fix broken test
This commit is contained in:
parent
79d0177c41
commit
0bb4b18e1d
16
tests/conftest.py
Normal file
16
tests/conftest.py
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
"""pytest config"""
|
||||||
|
|
||||||
|
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
|
||||||
|
|
@ -1,17 +1,10 @@
|
||||||
"""Test module `fetch_holidays`. """
|
"""Test module `fetch_holidays`. """
|
||||||
import json
|
import json
|
||||||
import os
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from conftest import _file_path
|
||||||
from fetch_holidays import CustomJSONEncoder, DescriptionParser
|
from fetch_holidays import CustomJSONEncoder, DescriptionParser
|
||||||
|
|
||||||
__dirname__ = os.path.abspath(os.path.dirname(__file__))
|
|
||||||
|
|
||||||
|
|
||||||
def _file_path(*other):
|
|
||||||
|
|
||||||
return os.path.join(__dirname__, *other)
|
|
||||||
|
|
||||||
|
|
||||||
def _normalize(iterable):
|
def _normalize(iterable):
|
||||||
return sorted(json.loads(json.dumps(list(iterable), cls=CustomJSONEncoder)),
|
return sorted(json.loads(json.dumps(list(iterable), cls=CustomJSONEncoder)),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user