moved test code from library to camtest.py (issue #2)