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_client.TestClient Class Reference
Inheritance diagram for microscope.testsuite.test_client.TestClient:

Public Member Functions

def setUp (self)
 
def tearDown (self)
 
def test_property_access (self)
 
def test_property_writing (self)
 

Public Attributes

 daemon
 
 thread
 

Detailed Description

Definition at line 65 of file test_client.py.

Member Function Documentation

◆ setUp()

def microscope.testsuite.test_client.TestClient.setUp (   self)

Definition at line 66 of file test_client.py.

66 def setUp(self):
67 self.daemon = Pyro4.Daemon()
68 self.thread = threading.Thread(target=self.daemon.requestLoop)
69

◆ tearDown()

def microscope.testsuite.test_client.TestClient.tearDown (   self)

Definition at line 70 of file test_client.py.

70 def tearDown(self):
71 self.daemon.shutdown()
72 self.thread.join()
73

◆ test_property_access()

def microscope.testsuite.test_client.TestClient.test_property_access (   self)
Test we can read properties via the Client

Definition at line 80 of file test_client.py.

80 def test_property_access(self):
81 """Test we can read properties via the Client"""
82 # list of (object-to-serve, property-name-to-test)
83 objs2prop = [
84 (PyroService(), "attr"),
85 (ExposedDeformableMirror(10), "n_actuators"),
86 ]
87 clients = self._serve_objs([x[0] for x in objs2prop])
88 for client, obj_prop in zip(clients, objs2prop):
89 obj = obj_prop[0]
90 name = obj_prop[1]
91 self.assertTrue(getattr(client, name), getattr(obj, name))
92

References microscope.testsuite.test_client.TestClient._serve_objs().

◆ test_property_writing()

def microscope.testsuite.test_client.TestClient.test_property_writing (   self)
Test we can write properties via the Client

Definition at line 93 of file test_client.py.

93 def test_property_writing(self):
94 """Test we can write properties via the Client"""
95 obj = PyroService()
96 client = (self._serve_objs([obj]))[0]
97 self.assertTrue(client.attr, 42)
98 client.attr = 10
99 self.assertTrue(client.attr, 10)
100 self.assertTrue(obj.attr, 10)
101
102

References microscope.testsuite.test_client.TestClient._serve_objs().

Member Data Documentation

◆ daemon

microscope.testsuite.test_client.TestClient.daemon

Definition at line 67 of file test_client.py.

◆ thread

microscope.testsuite.test_client.TestClient.thread

Definition at line 68 of file test_client.py.


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