minor code cleanup
exclude IPython tests if it's not importable