anon added the comment: Here are some inadequate tests to add to Lib/test/test_long.py
def test_bits_at(self): def bits_at(n, pos, width=1): return (n>>pos) & ((1 << width) - 1) for n in [123, 7777777, (1<<35)|(1<<30)|(1<<25)]: for i in range(50): for j in range(20): self.assertEqual(n.bits_at(i, j), bits_at(n, i, j)) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19915> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com