File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ build-backend = "setuptools.build_meta"
16
16
17
17
[project ]
18
18
name = " unittest-extensions"
19
- version = " 0.2.4 "
19
+ version = " 0.2.5 "
20
20
authors = [
21
21
{
name =
" Maximos Nikiforakis" ,
email =
" [email protected] " },
22
22
]
Original file line number Diff line number Diff line change @@ -61,7 +61,8 @@ def result(self) -> Any:
61
61
except Exception as e :
62
62
if len (e .args ) == 0 :
63
63
raise e
64
- msg = e .args [0 ]
64
+
65
+ msg = str (e .args [0 ])
65
66
if "subject() got an unexpected keyword argument" in msg :
66
67
raise TestError (
67
68
"Subject received "
Original file line number Diff line number Diff line change @@ -82,7 +82,6 @@ def test_raises_test_error(self):
82
82
83
83
84
84
class TestAppend (TestCase ):
85
-
86
85
def instance (self ) -> TestClass :
87
86
return TestClass ()
88
87
@@ -204,3 +203,11 @@ def subject(self):
204
203
205
204
def test_reraises_empty_exception (self ):
206
205
self .assertResultRaises (self .MyError )
206
+
207
+
208
+ class TestRaiseExceptionWithNonStrArgs (TestCase ):
209
+ def subject (self ):
210
+ raise KeyError (2 )
211
+
212
+ def test_reraises_error (self ):
213
+ self .assertResultRaises (KeyError )
You can’t perform that action at this time.
0 commit comments