File tree 1 file changed +14
-1
lines changed
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -5004,7 +5004,7 @@ class Child(Parent):
5004
5004
self .assertEqual (Parent .__subclasses__ (), [])
5005
5005
5006
5006
def test_attr_raise_through_property (self ):
5007
- # add test case for gh-103272
5007
+ # test case for gh-103272
5008
5008
class A :
5009
5009
def __getattr__ (self , name ):
5010
5010
raise ValueError ("FOO" )
@@ -5016,6 +5016,19 @@ def foo(self):
5016
5016
with self .assertRaisesRegex (ValueError , "FOO" ):
5017
5017
A ().foo
5018
5018
5019
+ # test case for gh-103551
5020
+ class B :
5021
+ @property
5022
+ def __getattr__ (self , name ):
5023
+ raise ValueError ("FOO" )
5024
+
5025
+ @property
5026
+ def foo (self ):
5027
+ raise NotImplementedError ("BAR" )
5028
+
5029
+ with self .assertRaisesRegex (NotImplementedError , "BAR" ):
5030
+ B ().foo
5031
+
5019
5032
5020
5033
class DictProxyTests (unittest .TestCase ):
5021
5034
def setUp (self ):
You can’t perform that action at this time.
0 commit comments