From 637f0c7a4c0e0bee1d54899ab95d93fc9a3f7c20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20K=C3=B6gl?= Date: Sun, 31 Dec 2017 14:27:44 +0100 Subject: [PATCH] Prefer Python3 when distinguishing str/unicode --- tests.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests.py b/tests.py index 55496ab..e1b4300 100755 --- a/tests.py +++ b/tests.py @@ -18,9 +18,9 @@ hypothesis = None try: - unicode + str = unicode # Python 2 except NameError: - unicode = str + pass class ApplyPatchTestCase(unittest.TestCase): @@ -632,8 +632,8 @@ def test_replace_missing(self): | st.dictionaries(st.text(string.printable), children)) class RoundtripTests(unittest.TestCase): - @hypothesis.example({}, {unicode('%20'): None}) - @hypothesis.example({unicode('%20'): None}, {}) + @hypothesis.example({}, {str('%20'): None}) + @hypothesis.example({str('%20'): None}, {}) @hypothesis.given(json_st, json_st) def test_roundtrip(self, src, dst): patch = jsonpatch.JsonPatch.from_diff(src, dst, False)