@@ -154,7 +154,7 @@ class C(metaclass=abc_ABCMeta):
154
154
@abc .abstractmethod
155
155
def method_one (self ):
156
156
pass
157
- msg = r"class C without an implementation for abstract method method_one"
157
+ msg = r"class C without an implementation for abstract method ' method_one' "
158
158
self .assertRaisesRegex (TypeError , msg , C )
159
159
160
160
def test_object_new_with_many_abstractmethods (self ):
@@ -165,7 +165,7 @@ def method_one(self):
165
165
@abc .abstractmethod
166
166
def method_two (self ):
167
167
pass
168
- msg = r"class C without an implementation for abstract methods method_one, method_two"
168
+ msg = r"class C without an implementation for abstract methods ' method_one, method_two' "
169
169
self .assertRaisesRegex (TypeError , msg , C )
170
170
171
171
def test_abstractmethod_integration (self ):
@@ -535,7 +535,7 @@ def updated_foo(self):
535
535
A .foo = updated_foo
536
536
abc .update_abstractmethods (A )
537
537
self .assertEqual (A .__abstractmethods__ , {'foo' , 'bar' })
538
- msg = "class A without an implementation for abstract methods bar, foo"
538
+ msg = "class A without an implementation for abstract methods ' bar, foo' "
539
539
self .assertRaisesRegex (TypeError , msg , A )
540
540
541
541
def test_update_implementation (self ):
@@ -547,7 +547,7 @@ def foo(self):
547
547
class B (A ):
548
548
pass
549
549
550
- msg = "class B without an implementation for abstract method foo"
550
+ msg = "class B without an implementation for abstract method ' foo' "
551
551
self .assertRaisesRegex (TypeError , msg , B )
552
552
self .assertEqual (B .__abstractmethods__ , {'foo' })
553
553
@@ -605,7 +605,7 @@ def foo(self):
605
605
606
606
abc .update_abstractmethods (B )
607
607
608
- msg = "class B without an implementation for abstract method foo"
608
+ msg = "class B without an implementation for abstract method ' foo' "
609
609
self .assertRaisesRegex (TypeError , msg , B )
610
610
611
611
def test_update_layered_implementation (self ):
@@ -627,7 +627,7 @@ def foo(self):
627
627
628
628
abc .update_abstractmethods (C )
629
629
630
- msg = "class C without an implementation for abstract method foo"
630
+ msg = "class C without an implementation for abstract method ' foo' "
631
631
self .assertRaisesRegex (TypeError , msg , C )
632
632
633
633
def test_update_multi_inheritance (self ):
0 commit comments