Added unit test and fixed for Python 3
Merge pull request #1 from astrofrog/single-test

Added unit test and fixed for Python 3