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 10
10
import jsonpointer
11
11
import sys
12
12
import string
13
+
13
14
try :
14
15
import hypothesis
15
16
from hypothesis import strategies as st
16
17
except ImportError :
17
18
hypothesis = None
18
19
20
+ try :
21
+ unicode
22
+ except NameError :
23
+ unicode = str
24
+
19
25
20
26
class ApplyPatchTestCase (unittest .TestCase ):
21
27
@@ -536,8 +542,8 @@ def test_replace_missing(self):
536
542
| st .dictionaries (st .text (string .printable ), children ))
537
543
538
544
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 }, {})
541
547
@hypothesis .given (json_st , json_st )
542
548
def test_roundtrip (self , src , dst ):
543
549
patch = jsonpatch .JsonPatch .from_diff (src , dst , False )
You can’t perform that action at this time.
0 commit comments