File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 3131
3232import re
3333import os
34+ import copy
3435import time
3536import json
3637import codecs
@@ -921,6 +922,8 @@ def hasTemplate(s):
921922class Json (String ):
922923 __slots__ = ()
923924
925+ def __call__ (self ):
926+ return copy .deepcopy (super (Json , self ).__call__ ())
924927 def set (self , v ):
925928 self .setValue (json .loads (v ))
926929 def __str__ (self ):
Original file line number Diff line number Diff line change @@ -140,13 +140,13 @@ def testJson(self):
140140 self .assertIsNot (v (), data )
141141
142142 with v .editable () as dict_ :
143- dict_ ['supy' ] = 'bot'
143+ dict_ ['supy' ] = [ 'bot' ]
144144 del dict_ ['qux' ]
145145 self .assertNotIn ('supy' , v ())
146146 self .assertIn ('qux' , v ())
147147 self .assertIn ('supy' , v ())
148- self .assertEqual (v ()['supy' ], 'bot' )
149- self .assertIsNot (v ()['supy' ], 'bot' )
148+ self .assertEqual (v ()['supy' ], [ 'bot' ] )
149+ self .assertIsNot (v ()['supy' ], [ 'bot' ] )
150150 self .assertNotIn ('qux' , v ())
151151
152152 def testNormalizedString (self ):
You can’t perform that action at this time.
0 commit comments