Skip to content

Commit 6f10715

Browse files
committed
Fix 3.2 compat.
1 parent 6cc61b1 commit 6f10715

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,18 @@
1010
import jsonpointer
1111
import sys
1212
import string
13+
1314
try:
1415
import hypothesis
1516
from hypothesis import strategies as st
1617
except ImportError:
1718
hypothesis = None
1819

20+
try:
21+
unicode
22+
except NameError:
23+
unicode = str
24+
1925

2026
class 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)

0 commit comments

Comments
 (0)