FAIRmat-NFDI / nomad-measurements

A NOMAD plugin containing base sections for measurements.
https://FAIRmat-NFDI.github.io/nomad-measurements/
Apache License 2.0
14 stars 1 forks source link

114 looks for errors in the structlogger in tests #115

Closed ka-sarthak closed 6 days ago

ka-sarthak commented 2 months ago

Resolves #114

ka-sarthak commented 6 days ago

@hampusnasstrom I checked again if infra deps are still needed. Only one of them is required: python-logstash. Including this one as a dev dep. But otherwise, the PR is ready.

To test the caplog fixture, you can log an error in the normalize method. This should make the pytest fail.

For example, adding this:

logger.error('Error: here for testing')

here: https://github.com/FAIRmat-NFDI/nomad-measurements/blob/057f4a9ea317c836365dbc21f6de96a972684280/src/nomad_measurements/xrd/schema.py#L1126