I hacked "is_ordinary" to work over number fields, and added a doctest. Bizarrely, if I type the lines from the doctest into the Sage console they work, but when run by the doctest script they raise an error!
Fixed in d35c0fc. (The problem is that Sage's algorithm for finding generators for coefficient fields of newforms is randomized when f[2] is not a generator, as here.)
I hacked "is_ordinary" to work over number fields, and added a doctest. Bizarrely, if I type the lines from the doctest into the Sage console they work, but when run by the doctest script they raise an error!