DECODE
DECODE copied to clipboard
Replace paths in tests by pkg resources
Relative paths to file or similiar could likely fail in packaged decode installations (because then folders don't exist anymore?). Do it similarly to load_reference, i.e.
try:
import importlib.resources as pkg_resources
except ImportError: # Try backported to PY<37 `importlib_resources`.
import importlib_resources as pkg_resources
from . import reference_files
param_ref = pkg_resources.open_text(reference_files, 'reference.yaml')