-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simulated vs Dummy devices #307
Comments
New stuff should got into Special exceptions are |
Thanks. So how do I test a device. Create a DummyX imported from SimulatedX or I just use SimulatedX in the test. Could I replace DummySLM? Or is it required to still be there for testing not yet legacy implementations of the SLM in cockpit? |
SLM definitely should be in microscope, it was always planned but we never got around to doing the actual work, which Julio has now done (thanks). We have had discussions about where the dsp should sit (or I guess it should now be called executor). I don't think we ever came to a concrete conclusion and it has always been rather orphaned of by its self. Happy to revisit that discussion but only seems sensible if someone has time to actually implement something, say the pi pico digital only executor. Its on my todo list but keeps not getting done. |
@iandobbie writes:
An interface to SLMs should be in Microscope but maybe not the @juliomateoslangerak writes:
This is about adding SLM support to Microscope so do this:
|
I went until step 5 but, the problem seems to me that test_devices.py defines: class TestDummySLM(unittest.TestCase, SLMTests):
def setUp(self):
self.device = dummies.DummySLM() where One solution I see is to refactor current Does that seem a solution to you? One question a bit off topic. |
That would work. But as you pointed out, we don't really have tests for the DummySLM ad the goal is to remove it when we do have a SLM class. So keep things simpler in the future, just change
mock devices should not require maintenance effort. They should be done once and that's it. I think the ones we currently have were too much work to implement and we need something simpler. If you can think of something better for you, then that would be nice but we won't block. The problem is that without mock devices, it's very difficult to make changes that affect them (and changes to the ABCs can affect all the devices). But we don't have mock devices for most devices so it's up to you if you want to do it. |
Yes, but tests in SLMTests will not be run unless subclassed. So I have to create a |
I wanted to write some test code for the SLM and realized that there are dummy devices for test, where I thought the simulated devices were going to be used.
What is the sense of keeping both types of devices? What are the differences?
The text was updated successfully, but these errors were encountered: