uses raises instead of with assert_raises - apparently doesn't work on python3 nose version.