BioImager  4.9.0
A .NET microscopy imaging application based on Bio library. Supports various microscopes by using imported libraries & GUI automation. Supports XInput game controllers to move stage, take images, run ImageJ macros on images or Bio C# scripts.
Loading...
Searching...
No Matches
microscope.testsuite.test_devices.TestDummyController Class Reference
Inheritance diagram for microscope.testsuite.test_devices.TestDummyController:
microscope.testsuite.test_devices.ControllerTests microscope.testsuite.test_devices.DeviceTests

Public Member Functions

 setUp (self)
 
 test_device_names (self)
 
 test_control_filterwheel (self)
 
 test_control_laser (self)
 
- Public Member Functions inherited from microscope.testsuite.test_devices.DeviceTests
 test_on_and_off (self)
 
 test_enable_and_disable (self)
 
 test_enable_enabled (self)
 
 test_disable_disabled (self)
 

Public Attributes

 laser = simulators.SimulatedLightSource()
 
 filterwheel = simulators.SimulatedFilterWheel(positions=6)
 
 device
 

Detailed Description

Definition at line 442 of file test_devices.py.

Member Function Documentation

◆ setUp()

microscope.testsuite.test_devices.TestDummyController.setUp ( self)

Definition at line 443 of file test_devices.py.

443 def setUp(self):
444 self.laser = simulators.SimulatedLightSource()
445 self.filterwheel = simulators.SimulatedFilterWheel(positions=6)
446 self.device = simulators.SimulatedController(
447 {"laser": self.laser, "filterwheel": self.filterwheel}
448 )
449

◆ test_control_filterwheel()

microscope.testsuite.test_devices.TestDummyController.test_control_filterwheel ( self)

Definition at line 455 of file test_devices.py.

455 def test_control_filterwheel(self):
456 self.assertEqual(self.device.devices["filterwheel"].position, 0)
457 self.device.devices["filterwheel"].position = 2
458 self.assertEqual(self.device.devices["filterwheel"].position, 2)
459

◆ test_control_laser()

microscope.testsuite.test_devices.TestDummyController.test_control_laser ( self)

Definition at line 460 of file test_devices.py.

460 def test_control_laser(self):
461 self.assertEqual(self.device.devices["laser"].power, 0.0)
462 self.device.devices["laser"].enable()
463 self.device.devices["laser"].power = 0.8
464 self.assertEqual(self.device.devices["laser"].power, 0.8)
465
466

◆ test_device_names()

microscope.testsuite.test_devices.TestDummyController.test_device_names ( self)

Definition at line 450 of file test_devices.py.

450 def test_device_names(self):
451 self.assertSetEqual(
452 {"laser", "filterwheel"}, set(self.device.devices.keys())
453 )
454

Member Data Documentation

◆ device

microscope.testsuite.test_devices.TestDummyController.device
Initial value:
= simulators.SimulatedController(
{"laser": self.laser, "filterwheel": self.filterwheel}
)

Definition at line 446 of file test_devices.py.

◆ filterwheel

microscope.testsuite.test_devices.TestDummyController.filterwheel = simulators.SimulatedFilterWheel(positions=6)

Definition at line 445 of file test_devices.py.

◆ laser

microscope.testsuite.test_devices.TestDummyController.laser = simulators.SimulatedLightSource()

Definition at line 444 of file test_devices.py.


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