jsonpointer 3.10__tar.gz → 3.11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {jsonpointer-3.10/jsonpointer.egg-info → jsonpointer-3.11}/PKG-INFO +1 -1
- {jsonpointer-3.10 → jsonpointer-3.11/jsonpointer.egg-info}/PKG-INFO +1 -1
- {jsonpointer-3.10 → jsonpointer-3.11}/jsonpointer.py +2 -2
- {jsonpointer-3.10 → jsonpointer-3.11}/tests.py +17 -0
- {jsonpointer-3.10 → jsonpointer-3.11}/AUTHORS +0 -0
- {jsonpointer-3.10 → jsonpointer-3.11}/LICENSE.txt +0 -0
- {jsonpointer-3.10 → jsonpointer-3.11}/MANIFEST.in +0 -0
- {jsonpointer-3.10 → jsonpointer-3.11}/README.md +0 -0
- {jsonpointer-3.10 → jsonpointer-3.11}/bin/jsonpointer +0 -0
- {jsonpointer-3.10 → jsonpointer-3.11}/doc/commandline.rst +0 -0
- {jsonpointer-3.10 → jsonpointer-3.11}/doc/index.rst +0 -0
- {jsonpointer-3.10 → jsonpointer-3.11}/doc/mod-jsonpointer.rst +0 -0
- {jsonpointer-3.10 → jsonpointer-3.11}/doc/tutorial.rst +0 -0
- {jsonpointer-3.10 → jsonpointer-3.11}/jsonpointer-stubs/__init__.pyi +0 -0
- {jsonpointer-3.10 → jsonpointer-3.11}/jsonpointer.egg-info/SOURCES.txt +0 -0
- {jsonpointer-3.10 → jsonpointer-3.11}/jsonpointer.egg-info/dependency_links.txt +0 -0
- {jsonpointer-3.10 → jsonpointer-3.11}/jsonpointer.egg-info/top_level.txt +0 -0
- {jsonpointer-3.10 → jsonpointer-3.11}/setup.cfg +0 -0
- {jsonpointer-3.10 → jsonpointer-3.11}/setup.py +0 -0
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
# Will be parsed by setup.py to determine package metadata
|
|
34
34
|
__author__ = 'Stefan Kögl <stefan@skoegl.net>'
|
|
35
|
-
__version__ = '3.
|
|
35
|
+
__version__ = '3.11'
|
|
36
36
|
__website__ = 'https://github.com/stefankoegl/python-json-pointer'
|
|
37
37
|
__license__ = 'Modified BSD License'
|
|
38
38
|
|
|
@@ -420,7 +420,7 @@ class JsonPointer:
|
|
|
420
420
|
"""
|
|
421
421
|
|
|
422
422
|
if not isinstance(other, JsonPointer):
|
|
423
|
-
return
|
|
423
|
+
return NotImplemented
|
|
424
424
|
|
|
425
425
|
return self.parts == other.parts
|
|
426
426
|
|
|
@@ -171,6 +171,23 @@ class ComparisonTests(unittest.TestCase):
|
|
|
171
171
|
# a pointer compares not-equal to objects of other types
|
|
172
172
|
self.assertFalse(p1 == "/something/1/b")
|
|
173
173
|
|
|
174
|
+
def test_other_types_remain_unequal(self):
|
|
175
|
+
for other in ["/a/b/c", None, 1, object()]:
|
|
176
|
+
for left, right in [(self.ptr1, other), (other, self.ptr1)]:
|
|
177
|
+
with self.subTest(left=left, right=right):
|
|
178
|
+
self.assertFalse(left == right)
|
|
179
|
+
self.assertTrue(left != right)
|
|
180
|
+
|
|
181
|
+
def test_reflected_equality(self):
|
|
182
|
+
for left, right in [(self.ptr1, mock.ANY), (mock.ANY, self.ptr1)]:
|
|
183
|
+
with self.subTest(left=left, right=right):
|
|
184
|
+
self.assertTrue(left == right)
|
|
185
|
+
|
|
186
|
+
def test_reflected_inequality(self):
|
|
187
|
+
for left, right in [(self.ptr1, mock.ANY), (mock.ANY, self.ptr1)]:
|
|
188
|
+
with self.subTest(left=left, right=right):
|
|
189
|
+
self.assertFalse(left != right)
|
|
190
|
+
|
|
174
191
|
def test_contains(self):
|
|
175
192
|
self.assertTrue(self.ptr1.contains(self.ptr2))
|
|
176
193
|
self.assertTrue(self.ptr1.contains(self.ptr1))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|