|
600 | 600 | {"src": "print(int_to_bytes(258, 2, 'big'))", "output": ["b'\\x01\\x02'"]}, |
601 | 601 | {"src": "print(int_to_bytes(513, 2, 'little'))", "output": ["b'\\x01\\x02'"]}, |
602 | 602 | {"src": "n = 0xCAFEBABE\nprint(int_from_bytes(int_to_bytes(n, 4, 'big'), 'big'))", "output": ["3405691582"]}, |
| 603 | + {"src": "print(int_from_bytes(5, 'big'))", "output": [], "error": "int_from_bytes() first arg must be bytes"}, |
| 604 | + {"src": "print(int_to_bytes(508, 4, -1))", "output": [], "error": "int_to_bytes() byteorder must be 'big' or 'little'"}, |
603 | 605 | {"src": "print(frozenset())", "output": ["frozenset()"]}, |
604 | 606 | {"src": "print(sorted(frozenset([1,2,3,2,1])))", "output": ["[1, 2, 3]"]}, |
605 | 607 | {"src": "fs = frozenset([1,2,3])\nprint(2 in fs)\nprint(5 in fs)", "output": ["True", "False"]}, |
|
1803 | 1805 | {"src": "print('a' * 20000000)", "output": [], "error": "MemoryError"}, |
1804 | 1806 | {"src": "print([0] * 20000000)", "output": [], "error": "MemoryError"}, |
1805 | 1807 | {"src": "print(list(range(20000000)))", "output": [], "error": "MemoryError"}, |
| 1808 | + {"src": "print(bytes(999999999995))", "output": [], "error": "MemoryError"}, |
| 1809 | + {"src": "print('a'.center(999999999995))", "output": [], "error": "MemoryError"}, |
| 1810 | + {"src": "print('a'.zfill(999999999995))", "output": [], "error": "MemoryError"}, |
1806 | 1811 | {"src": "print(format(5, '20000001d'))", "output": [], "error": "format width exceeds limit"}, |
1807 | 1812 | {"src": "print(format(5, '.20000001f'))", "output": [], "error": "format precision exceeds limit"}, |
1808 | 1813 | {"src": "def f():\n sleep(0)\n return f()\nprint(f())", "output": [], "error": "RecursionError"}, |
|
0 commit comments