diff options
| author | 2024-06-22 21:19:36 -0400 | |
|---|---|---|
| committer | 2024-06-22 21:19:36 -0400 | |
| commit | 80e39a8fc7de105510cbbdca8507f2a4b8c9e01d (patch) | |
| tree | bb5caa2f5fafc5116b8f89e659085ffbd8a918f2 /test/test_util.py | |
| parent | 1c28712d865e30ed752988ba0b6944882250b665 (diff) | |
New upstream version 1.27.1.upstream/1.27.1
Diffstat (limited to 'test/test_util.py')
| -rw-r--r-- | test/test_util.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_util.py b/test/test_util.py index 83b44b7..35e7247 100644 --- a/test/test_util.py +++ b/test/test_util.py @@ -745,6 +745,7 @@ def hash(value): self.assertEqual(repr(obj), repr(None)) self.assertEqual(format(obj), str(None)) self.assertEqual(format(obj, "%F"), str(None)) + self.assertIs(obj.attr, obj) self.assertIs(obj["key"], obj) self.assertIs(obj(), obj) @@ -752,6 +753,17 @@ def hash(value): self.assertIs(obj(foo="bar"), obj) self.assertEqual(util.json_dumps(obj), "null") + self.assertLess(obj, "foo") + self.assertLessEqual(obj, None) + self.assertFalse(obj == obj) + self.assertTrue(obj != obj) + self.assertGreater(123, obj) + self.assertGreaterEqual(1.23, obj) + + mapping = {} + mapping[obj] = 123 + self.assertIn(obj, mapping) + i = 0 for _ in obj: i += 1 |
