MCPcopy Create free account
hub / github.com/rthalley/dnspython / test_uncomparable

Method test_uncomparable

tests/test_serial.py:110–117  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

108 self.assertRaises(ValueError, bad2)
109
110 def test_uncomparable(self):
111 self.assertFalse(S8(0) == S2(0))
112 self.assertFalse(S8(0) == "a")
113 self.assertTrue(S8(0) != "a")
114 self.assertRaises(TypeError, lambda: S8(0) < "a")
115 self.assertRaises(TypeError, lambda: S8(0) <= "a")
116 self.assertRaises(TypeError, lambda: S8(0) > "a")
117 self.assertRaises(TypeError, lambda: S8(0) >= "a")
118
119 def test_modulo(self):
120 self.assertEqual(S8(-1), 255)

Callers

nothing calls this directly

Calls 2

S8Function · 0.85
S2Function · 0.85

Tested by

no test coverage detected