Fix broken doctests
Merge pull request #1175 from frewsxcv/patch-2

Fix broken sphinx docs, thanks @frewsxcv
Merge pull request #1140 from SeanHayes/test-enhancements

Test enhancements to make your life easier.
Use list comprehensions where reasonable, which is slightly faster.