Skip to content

Commit ac7c86e

Browse files
committed
fix doctest for Python 3
1 parent 856c7a6 commit ac7c86e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

jsonpointer.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,7 @@ def contains(self, ptr):
251251
def path(self):
252252
""" Returns the string representation of the pointer
253253
254-
>>> ptr = JsonPointer('/~0/0/~1')
255-
>>> ptr.path
256-
u'/~0/0/~1'
254+
>>> ptr = JsonPointer('/~0/0/~1').path == '/~0/0/~1'
257255
"""
258256
parts = [part.replace('~', '~0') for part in self.parts]
259257
parts = [part.replace('/', '~1') for part in parts]
@@ -279,8 +277,8 @@ def __hash__(self):
279277
def from_parts(cls, parts):
280278
""" Constructs a JsonPointer from a list of (unescaped) paths
281279
282-
>>> JsonPointer.from_parts(['a', '~', '/', 0]).path
283-
u'/a/~0/~1/0'
280+
>>> JsonPointer.from_parts(['a', '~', '/', 0]).path == '/a/~0/~1/0'
281+
True
284282
"""
285283
parts = [str(part) for part in parts]
286284
parts = [part.replace('~', '~0') for part in parts]

0 commit comments

Comments
 (0)