def testIsAbstract(self):
   with self.test_session():
     with self.assertRaisesRegexp(TypeError,
                                  ("Can't instantiate abstract class Bijector "
                                   "with abstract methods __init__")):
       bijector.Bijector()  # pylint: disable=abstract-class-instantiated
Beispiel #2
0
 def testIsAbstract(self):
     # In Python 3.9, "abstract methods" become "abstract method"
     with self.assertRaisesRegex(
             TypeError, ("Can't instantiate abstract class Bijector "
                         "with abstract methods? __init__")):
         bijector.Bijector()  # pylint: disable=abstract-class-instantiated