File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -427,6 +427,24 @@ def test_move_from_numeric_to_alpha_dict_key(self):
427
427
res = jsonpatch .apply_patch (src , patch )
428
428
self .assertEqual (res , dst )
429
429
430
+ def test_issue90 (self ):
431
+ """In JSON 1 is different from True even though in python 1 == True"""
432
+ src = {'A' : 1 }
433
+ dst = {'A' : True }
434
+ patch = jsonpatch .make_patch (src , dst )
435
+ res = jsonpatch .apply_patch (src , patch )
436
+ self .assertEqual (res , dst )
437
+ self .assertIsInstance (res ['A' ], bool )
438
+
439
+ def test_issue103 (self ):
440
+ """In JSON 1 is different from 1.0 even though in python 1 == 1.0"""
441
+ src = {'A' : 1 }
442
+ dst = {'A' : 1.0 }
443
+ patch = jsonpatch .make_patch (src , dst )
444
+ res = jsonpatch .apply_patch (src , patch )
445
+ self .assertEqual (res , dst )
446
+ self .assertIsInstance (res ['A' ], float )
447
+
430
448
431
449
432
450
class OptimizationTests (unittest .TestCase ):
You can’t perform that action at this time.
0 commit comments