Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace paths in tests by pkg resources #8

Open
Haydnspass opened this issue Oct 5, 2020 · 0 comments
Open

Replace paths in tests by pkg resources #8

Haydnspass opened this issue Oct 5, 2020 · 0 comments
Labels
bug Something isn't working tests
Milestone

Comments

@Haydnspass
Copy link
Collaborator

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 Haydnspass added bug Something isn't working enhancement New feature or request tests and removed enhancement New feature or request labels Oct 5, 2020
@Haydnspass Haydnspass added this to the v0.11 milestone Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tests
Projects
None yet
Development

No branches or pull requests

1 participant