Currently, inspect.isabstract() may return an integer like 1048576 instead of True, or 0 instead of False. Although technically correct, no other isXXX function behaves that way; also, isgeneratorfunction() uses a similar code construct but casts the result into a boolean. The attached patch makes inspect.isabstract() return a boolean value always.
The patch works, as this is what is implicitly happening anyway if you use the function. There seem to be no tests for this function, so there is nothing to break. I guess this is the right time to get some tests. Gabriel, would you like to write tests for this function?
I don't think we should test the actual type returned (bool); that would be overspecifying. The documentation doesn't promise it IS a boolean, and no other test for any isXXX() function checks the type either. I'd remove the last five assertions.