Skip to content

Commit 637f0c7

Browse files
committed
Prefer Python3 when distinguishing str/unicode
1 parent fce420c commit 637f0c7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
hypothesis = None
1919

2020
try:
21-
unicode
21+
str = unicode # Python 2
2222
except NameError:
23-
unicode = str
23+
pass
2424

2525

2626
class ApplyPatchTestCase(unittest.TestCase):
@@ -632,8 +632,8 @@ def test_replace_missing(self):
632632
| st.dictionaries(st.text(string.printable), children))
633633

634634
class RoundtripTests(unittest.TestCase):
635-
@hypothesis.example({}, {unicode('%20'): None})
636-
@hypothesis.example({unicode('%20'): None}, {})
635+
@hypothesis.example({}, {str('%20'): None})
636+
@hypothesis.example({str('%20'): None}, {})
637637
@hypothesis.given(json_st, json_st)
638638
def test_roundtrip(self, src, dst):
639639
patch = jsonpatch.JsonPatch.from_diff(src, dst, False)

0 commit comments

Comments
 (0)