None
Test: nexusjsontemplate|loki|nexus_json_template|
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
nexus_json_template = PosixPath('loki-dynamic.json')
def test_nexus_json_template(nexus_json_template: pathlib.Path) -> None:
downloaded = json.loads(nexus_json_template.read_text())
assert "children" in downloaded # Check if the file was downloaded correctly
# collect_streaming_modules will validate the structure
# that is required by `esslivedata`.
# It is currently removed from `esslivedata` package.
# We should update the method that is used by `esslivedata` once it is added back
# or updated in `esslivedata`.
> collect_streaming_modules(downloaded)
tests/nexusjsontemplate/nexus_json_template_test.py:201:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/nexusjsontemplate/nexus_json_template_test.py:180: in collect_streaming_modules
_validate_f144_module_spec(value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
module_spec = StreamModuleValue(path=('entry', 'instrument', 'sample_position_z'), parent={'name': 'sample_position_z', 'type': 'gro..._units': 'm'}, 'attributes': [{'name': 'units', 'dtype': 'string', 'values': 'm'}]}]}, dtype='double', value_units='m')
def _validate_f144_module_spec(
module_spec: StreamModuleValue,
) -> None:
"""Validate the f144 module."""
if len(module_spec.parent["children"]) != 1:
> raise InvalidNexusStructureError(
"Group containing f144 module should have exactly one child"
)
E tests.nexusjsontemplate.nexus_json_template_test.InvalidNexusStructureError: Group containing f144 module should have exactly one child
tests/nexusjsontemplate/nexus_json_template_test.py:117: InvalidNexusStructureError
nexus_json_template = PosixPath('loki-dynamic.json')
def test_nexus_json_template(nexus_json_template: pathlib.Path) -> None:
downloaded = json.loads(nexus_json_template.read_text())
assert "children" in downloaded # Check if the file was downloaded correctly
# collect_streaming_modules will validate the structure
# that is required by `esslivedata`.
# It is currently removed from `esslivedata` package.
# We should update the method that is used by `esslivedata` once it is added back
# or updated in `esslivedata`.
> collect_streaming_modules(downloaded)
tests/nexusjsontemplate/nexus_json_template_test.py:201:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/nexusjsontemplate/nexus_json_template_test.py:180: in collect_streaming_modules
_validate_f144_module_spec(value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
module_spec = StreamModuleValue(path=('entry', 'instrument', 'sample_position_z'), parent={'name': 'sample_position_z', 'type': 'gro..._units': 'm'}, 'attributes': [{'name': 'units', 'dtype': 'string', 'values': 'm'}]}]}, dtype='double', value_units='m')
def _validate_f144_module_spec(
module_spec: StreamModuleValue,
) -> None:
"""Validate the f144 module."""
if len(module_spec.parent["children"]) != 1:
> raise InvalidNexusStructureError(
"Group containing f144 module should have exactly one child"
)
E tests.nexusjsontemplate.nexus_json_template_test.InvalidNexusStructureError: Group containing f144 module should have exactly one child
tests/nexusjsontemplate/nexus_json_template_test.py:117: InvalidNexusStructureError
nexus_json_template = PosixPath('loki-dynamic.json')
def test_nexus_json_template(nexus_json_template: pathlib.Path) -> None:
downloaded = json.loads(nexus_json_template.read_text())
assert "children" in downloaded # Check if the file was downloaded correctly
# collect_streaming_modules will validate the structure
# that is required by `esslivedata`.
# It is currently removed from `esslivedata` package.
# We should update the method that is used by `esslivedata` once it is added back
# or updated in `esslivedata`.
> collect_streaming_modules(downloaded)
tests/nexusjsontemplate/nexus_json_template_test.py:201:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/nexusjsontemplate/nexus_json_template_test.py:180: in collect_streaming_modules
_validate_f144_module_spec(value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
module_spec = StreamModuleValue(path=('entry', 'instrument', 'sample_position_z'), parent={'name': 'sample_position_z', 'type': 'gro..._units': 'm'}, 'attributes': [{'name': 'units', 'dtype': 'string', 'values': 'm'}]}]}, dtype='double', value_units='m')
def _validate_f144_module_spec(
module_spec: StreamModuleValue,
) -> None:
"""Validate the f144 module."""
if len(module_spec.parent["children"]) != 1:
> raise InvalidNexusStructureError(
"Group containing f144 module should have exactly one child"
)
E tests.nexusjsontemplate.nexus_json_template_test.InvalidNexusStructureError: Group containing f144 module should have exactly one child
tests/nexusjsontemplate/nexus_json_template_test.py:117: InvalidNexusStructureError