(self, n=500)
| 301 | |
| 302 | class TestInsort: |
| 303 | def test_vsBuiltinSort(self, n=500): |
| 304 | from random import choice |
| 305 | for insorted in (list(), UserList()): |
| 306 | for i in range(n): |
| 307 | digit = choice("0123456789") |
| 308 | if digit in "02468": |
| 309 | f = self.module.insort_left |
| 310 | else: |
| 311 | f = self.module.insort_right |
| 312 | f(insorted, digit) |
| 313 | self.assertEqual(sorted(insorted), insorted) |
| 314 | |
| 315 | def test_backcompatibility(self): |
| 316 | self.assertEqual(self.module.insort, self.module.insort_right) |
nothing calls this directly
no test coverage detected