File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -78,15 +78,20 @@ def _get_middlewares(self):
7878 continue
7979 return middlewares
8080
81+ def _item_to_dict (self , value ):
82+ if not isinstance (value , Item ):
83+ return value
84+ as_dict = dict (value )
85+ for key , val in as_dict .items ():
86+ as_dict [key ] = self ._item_to_dict (val )
87+ return as_dict
88+
8189 def _compare (self , expected , found , message ):
8290 x_label = "expected"
8391 y_label = "found"
8492
85- if isinstance (expected , Item ):
86- expected = dict (expected )
87-
88- if isinstance (found , Item ):
89- found = dict (found )
93+ expected = self ._item_to_dict (expected )
94+ found = self ._item_to_dict (found )
9095
9196 compare (
9297 expected = expected ,
Original file line number Diff line number Diff line change 66
77setuptools .setup (
88 name = 'scrapy-autounit' ,
9- version = '0.0.31 ' ,
9+ version = '0.0.32 ' ,
1010 author = '' ,
1111 author_email = '' ,
1212 description = 'Automatic unit test generation for Scrapy.' ,
You can’t perform that action at this time.
0 commit comments