File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -103,9 +103,12 @@ class hello(object):
103
103
def he_method_notexists (self ):
104
104
pass
105
105
106
- he_pm .register (hello ())
107
- with pytest .raises (PluginValidationError ):
106
+ plugin = hello ()
107
+
108
+ he_pm .register (plugin )
109
+ with pytest .raises (PluginValidationError ) as excinfo :
108
110
he_pm .check_pending ()
111
+ assert excinfo .value .plugin is plugin
109
112
110
113
111
114
def test_register_mismatch_arg (he_pm ):
@@ -114,8 +117,11 @@ class hello(object):
114
117
def he_method1 (self , qlwkje ):
115
118
pass
116
119
117
- with pytest .raises (PluginValidationError ):
118
- he_pm .register (hello ())
120
+ plugin = hello ()
121
+
122
+ with pytest .raises (PluginValidationError ) as excinfo :
123
+ he_pm .register (plugin )
124
+ assert excinfo .value .plugin is plugin
119
125
120
126
121
127
def test_register (pm ):
You can’t perform that action at this time.
0 commit comments