Add tests for things in utils
Use print_function
Merge pull request #5241 from takluyver/utils-test-coverage1

Add some tests for utils