pynta.tests package

Submodules

pynta.tests.test_controllers module

Test the available controllers for the proper structure. Since controllers are inherently impossible to test on all systems, the only reasonable thing to do is to check for consistency in methods.

Todo

Define the minimum structure that makes a controller

Todo

Implement tests to assert whether the controllers have the needed methods

copyright

Aquiles Carattino <aquiles@uetke.com>

license

AGPLv3, see LICENSE for more details

pynta.tests.test_examples module

Check whether the examples are able to perform an experiment with dummy devices.

Todo

Find a way of testing the UI, is it possible within Travis? may be useful to check what PyQtGraph is doing for the tests.

copyright

Aquiles Carattino <aquiles@uetke.com>

license

AGPLv3, see LICENSE for more details

pynta.tests.test_models module

Models can be checked for structure, but also models which depend on dummy devices can be tested thoroughly.

Todo

Define minimum structure for each kind of model

Todo

Define tests for dummy-based models.

copyright

Aquiles Carattino <aquiles@uetke.com>

license

AGPLv3, see LICENSE for more details.

pynta.tests.test_zmq module

Test the limits of the pyZMQ library

Example on how to test the bandwidth limits for pyZMQ. We create a Queue with a given number of frames and an empty queue. The first is fed to the publisher, while the second is used by the subscriber to append the data. In this way we can check whether all the frames arrived in order and the bandwidth limitation for ZMQ.

If any attempts at improve the architecture of publisher/subscriber are tried, this test is going to be useful to determine whether there is a real improvement in performance.

Note

Replacing send_pyobj by the nocopy option is faster, however it also requires to reshape the data, which adds an overhead and eventually reaches equivalent bandwidths.

Warning

This script consumes a lot of memory because it allocates a queue with thousands of elements in it. If you have a more limited system, consider lowering the amount of elements or changing the data type.

pynta.tests.test_zmq.main(num_data_frames=1000, dtype=<class 'numpy.uint16'>)[source]
pynta.tests.test_zmq.test_func(data, queue)[source]

Module contents