psychopy/psychopy — pull request #128 by williamhogman (2012-04-05 23:48:41+00:00)
Title: Refactored findPhotometer & UI improvements in monitor center

Another bunch of changes for the photometers

I've added a combobox for picking the serial port to use. Using this ComboBox we can pick any device file to use as our serial port. The main benefit of selecting which port to use is that it makes connecting to the photometer faster. Waiting for timeouts on unused serial ports makes it harder to use some buggy photometers like the PR650.

![New UI](http://i.imgur.com/OQAoI.png)

To do this I had to refactor findPhotometer a bit, moving the code for finding serial ports and enumerating photometer classes into their own functions.

I added "meta-data" to all the photometers (yes, even ColorCAL), because we have this meta-data we don't need to hard-code the photometer names and their corresponding classes into both the GUI and findPhotometer.

I also added a bunch of unit-tests for findPhotometer and related functions. Some of the added unit-tests use the mock package but if/when we switch to py.tests we can get rid of that dependency.