Closed prjemian closed 2 years ago
Note that all NXDL files tested do not have any link
specifications within the NXentry
group. There are links specified in some NXDL files (such as NXsas
) within the NXdata
group.
The reason that maxOccurs
in all test cases is that it is set in the nxdl_manager.py
code: https://github.com/prjemian/punx/blob/f0e707d1545e75b8aa5184334454849f03e24d38/punx/nxdl_manager.py#L317
Was expecting this in base classes to be set to "unbounded"
. Investigate separately.
Add similar tests for other classes in nxdl_manager
module.
Side note: At this point (HEAD: 9b653a5) the run time of pytest
from the project's root takes much (~3x) longer on Windows 10 than Linux. Same environment installation (bluesky_2022_1
). Why?
time, s | # tests | OS | hardware details |
---|---|---|---|
149.3 | 152 | Win 10 | CPU: Dual Core Intel Core i7-1065G7 (-MCP-) speed: 1498 MHz |
58.75 | 152 | Linux Mint 20 | (guest VM on above) CPU: Dual Core Intel Core i7-1065G7 (-MCP-) speed: 1498 MHz |
48.5 | 152 | Linux Mint 20.1 | CPU: Quad Core Intel Core i5-7600 (-MCP-) speed/min/max: 910/800/4100 |
Observe that it's not just a difference in the CPU speed.
@carterbox Basic tests added. Also some detailed tests added. There could always be more. Work on this issue has provoked TODO and FIXME comments that, each, need to create a new issue for attention.
(This PR is ready for review.)
All FIXME
comments have associated issues now. Issues for some TODO
comments must be created.
@carterbox Are there any changes to be made here?
@carterbox Thanks!
Provide basic tests for NXDL_Manager that shows its structure.
This is the list of tests to be added:
class NXDL__Mixin(object):
class NXDL__attribute(NXDL__Mixin):
class NXDL__definition(NXDL__Mixin):
class NXDL__dim(NXDL__Mixin):
class NXDL__dimensions(NXDL__Mixin):
class NXDL__field(NXDL__Mixin):
class NXDL__group(NXDL__Mixin):
class NXDL__link(NXDL__Mixin):
class NXDL__symbols(NXDL__Mixin):