BCDA-APS / bluesky_training

Bluesky training, including instrument package
https://bcda-aps.github.io/bluesky_training/
Other
11 stars 0 forks source link

create unit tests for newSpecFile #159

Closed prjemian closed 1 year ago

prjemian commented 1 year ago
prjemian commented 1 year ago

Have not yet encountered the reported situation.

prjemian commented 1 year ago

This is ready for review.

rodolakis commented 1 year ago

I would need a your help to understand that one.

prjemian commented 1 year ago

I would need a your help to understand that one.

Unit testing is a new topic we should get into. This PR might be that example that offers limited complexity yet real-world use. The actual code changes in bluesky/instrument/callbacks/spec_data_file_writer.py are few. The bulk of the new code consists of blocks which tests for the reported error and related capability.

What do you say if we leave this PR open and talk about it in an upcoming 1-on-1 meeting?

prjemian commented 1 year ago

You could test this branch and code yourself with this local command:

pytest -vvv --lf ./bluesky/tests/test_newSpecFile.py