File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1010import jsonpointer
1111import sys
1212import string
13+
1314try :
1415 import hypothesis
1516 from hypothesis import strategies as st
1617except ImportError :
1718 hypothesis = None
1819
20+ try :
21+ unicode
22+ except NameError :
23+ unicode = str
24+
1925
2026class ApplyPatchTestCase (unittest .TestCase ):
2127
@@ -536,8 +542,8 @@ def test_replace_missing(self):
536542 | st .dictionaries (st .text (string .printable ), children ))
537543
538544 class RoundtripTests (unittest .TestCase ):
539- @hypothesis .example ({}, {u '%20' : None })
540- @hypothesis .example ({u '%20' : None }, {})
545+ @hypothesis .example ({}, {unicode ( '%20' ) : None })
546+ @hypothesis .example ({unicode ( '%20' ) : None }, {})
541547 @hypothesis .given (json_st , json_st )
542548 def test_roundtrip (self , src , dst ):
543549 patch = jsonpatch .JsonPatch .from_diff (src , dst , False )
You can’t perform that action at this time.
0 commit comments