Testing Servers - syue99/Lab_control GitHub Wiki
Because pylabrad is based on twisted which is inherently asynchronous the testing module needs to account for this. The twisted project developed trial, which is based on unittest, for testing twisted code.
To try some very basic testing use the testing_servers branch. Start the BasicServer. Once this is started, in a shell navigate to the directory containing test_BasicServer.py. Then from that directory run:
> trial test_BasicServer
Several tests should pass.
The two relevant files in this project are at:
\lib\servers\BasicServer.py
and
\tests\lib\servers\test_BasicServer.py
Related areas
Synchronous testing