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

Method test_uncastable

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

Source from the content-addressed store, hash-verified

92 self.assertTrue(S8(0) >= 255)
93
94 def test_uncastable(self):
95 self.assertRaises(ValueError, lambda: S8(0) + "a")
96 self.assertRaises(ValueError, lambda: S8(0) - "a")
97
98 def bad1():
99 v = S8(0)
100 v += "a"
101
102 self.assertRaises(ValueError, bad1)
103
104 def bad2():
105 v = S8(0)
106 v -= "a"
107
108 self.assertRaises(ValueError, bad2)
109
110 def test_uncomparable(self):
111 self.assertFalse(S8(0) == S2(0))

Callers

nothing calls this directly

Calls 1

S8Function · 0.85

Tested by

no test coverage detected