BioImager  3.9.1
A .NET microscopy imaging library. Supports various microscopes by using imported libraries & GUI automation. Supported libraries include PriorĀ® & ZeissĀ® & all devices supported by Micromanager 2.0 and python-microscope.
Loading...
Searching...
No Matches
microscope.testsuite.test_devices.DeviceTests Class Reference
Inheritance diagram for microscope.testsuite.test_devices.DeviceTests:
microscope.testsuite.test_devices.CameraTests microscope.testsuite.test_devices.ControllerTests microscope.testsuite.test_devices.DSPTests microscope.testsuite.test_devices.DeformableMirrorTests microscope.testsuite.test_devices.FilterWheelTests microscope.testsuite.test_devices.LightSourceTests microscope.testsuite.test_devices.SLMTests microscope.testsuite.test_devices.TestDummyCamera microscope.testsuite.test_devices.TestDummyController microscope.testsuite.test_devices.TestDummyDSP microscope.testsuite.test_devices.TestDummyDeformableMirror microscope.testsuite.test_devices.TestOnePositionFilterWheel microscope.testsuite.test_devices.TestSixPositionFilterWheel microscope.testsuite.test_devices.TestCoboltLaser microscope.testsuite.test_devices.TestCoherentSapphireLaser microscope.testsuite.test_devices.TestDummyLightSource microscope.testsuite.test_devices.TestOmicronDeepstarLaser microscope.testsuite.test_devices.TestDummySLM

Public Member Functions

def test_on_and_off (self)
 
def test_enable_and_disable (self)
 
def test_enable_enabled (self)
 
def test_disable_disabled (self)
 

Detailed Description

Tests cases for all devices.

This collection of tests cover the very basic behaviour of
devices,stuff like initialising and enabling the device.  Classes
of tests specific to each device type should subclass from it.

Subclasses must define a `device` property during `setUp`, an
instance of :class:`Device`.

Definition at line 96 of file test_devices.py.

Member Function Documentation

◆ test_disable_disabled()

def microscope.testsuite.test_devices.DeviceTests.test_disable_disabled (   self)
Handles disabling of an already disabled device.

Test disabling twice, both before and after enabling it for
the first time.

Definition at line 134 of file test_devices.py.

134 def test_disable_disabled(self):
135 """Handles disabling of an already disabled device.
136
137 Test disabling twice, both before and after enabling it for
138 the first time.
139 """
140 self.device.initialize()
141 self.device.disable()
142 self.device.disable()
143 self.device.enable()
144 self.assertTrue(self.device.enabled)
145 self.device.disable()
146 self.device.disable()
147
148

References microscope.testsuite.test_devices.TestDummyLightSource.device, microscope.testsuite.test_devices.TestCoherentSapphireLaser.device, microscope.testsuite.test_devices.TestCoboltLaser.device, microscope.testsuite.test_devices.TestOmicronDeepstarLaser.device, microscope.testsuite.test_devices.TestDummyCamera.device, microscope.testsuite.test_devices.TestDummyController.device, microscope.testsuite.test_devices.TestOnePositionFilterWheel.device, microscope.testsuite.test_devices.TestSixPositionFilterWheel.device, microscope.testsuite.test_devices.TestDummyDeformableMirror.device, microscope.testsuite.test_devices.TestDummySLM.device, and microscope.testsuite.test_devices.TestDummyDSP.device.

◆ test_enable_and_disable()

def microscope.testsuite.test_devices.DeviceTests.test_enable_and_disable (   self)

Definition at line 113 of file test_devices.py.

113 def test_enable_and_disable(self):
114 # TODO: we need to define what happens when enable is called
115 # and device has not been initialised. See issue #69
116 self.device.initialize()
117 self.device.enable()
118 self.assertTrue(self.device.enabled)
119 # We don't check if it is disabled after shutdown because
120 # some devices can't be turned off.
121 # TODO: add a `has_disabled_state` to the fake so we can
122 # query whether we can check about being disabled.
123 self.device.disable()
124 self.device.shutdown()
125

◆ test_enable_enabled()

◆ test_on_and_off()


The documentation for this class was generated from the following file: