FIX issue#8147 Recursion depth exceeded in as_int(Rational(0, 0))

update test_as_int in test_compatibility.py