Closed
Description
Problem
Running pytest in the main branch with latest diffpy.utils
FAILED tests/test_pdfmorphapp.py::TestApp::test_parser_systemexits - AttributeError: module 'diffpy.utils.parsers' has no attribute 'loaddata'
FAILED tests/test_pdfmorphapp.py::TestApp::test_morphsequence - AttributeError: module 'diffpy.utils.parsers' has no attribute 'loaddata'
FAILED tests/test_pdfmorphio.py::TestApp::test_morph_outputs - AttributeError: module 'diffpy.utils.parsers' has no attribute 'loaddata'
FAILED tests/test_tools.py::TestTools::test_field_sort - AttributeError: module 'diffpy.utils.parsers' has no attribute 'loaddata'
It comes from lines like this
import diffpy.utils.parsers as parsers
# ...
rv = parsers.loaddata.loadData(fname, unpack=True)
Proposed solution
Adding addtional import path when importing
import diffpy.utils.parsers as parsers
import diffpy.utils.parsers.loaddata
# ...
rv = parsers.loaddata.loadData(fname, unpack=True)
Metadata
Metadata
Assignees
Labels
No labels