DECODE icon indicating copy to clipboard operation
DECODE copied to clipboard

Replace paths in tests by pkg resources

Open Haydnspass opened this issue 5 years ago • 0 comments

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')

Haydnspass avatar Oct 05 '20 10:10 Haydnspass