Continuing #2057, s/assert/raise AssertionError/g

#2057

Though I've never encountered usage of python -O in the wild.