make inspect.isabstract() always return a boolean; add a test for it, too #7069
diff --git a/Lib/inspect.py b/Lib/inspect.py
index ac3434d..e5098d7 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -242,7 +242,7 @@
 
 def isabstract(object):
     """Return true if the object is an abstract base class (ABC)."""
-    return isinstance(object, type) and object.__flags__ & TPFLAGS_IS_ABSTRACT
+    return bool(isinstance(object, type) and object.__flags__ & TPFLAGS_IS_ABSTRACT)
 
 def getmembers(object, predicate=None):
     """Return all members of an object as (name, value) pairs sorted by name.