MCPcopy Index your code
hub / github.com/python/cpython / test_abs

Method test_abs

Lib/test/test_operator.py:135–140  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

133 self.assertFalse(operator.gt(1, 2.0))
134
135 def test_abs(self):
136 operator = self.module
137 self.assertRaises(TypeError, operator.abs)
138 self.assertRaises(TypeError, operator.abs, None)
139 self.assertEqual(operator.abs(-1), 1)
140 self.assertEqual(operator.abs(1), 1)
141
142 def test_add(self):
143 operator = self.module

Callers

nothing calls this directly

Calls 3

absMethod · 0.80
assertRaisesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected