mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Make fixes, improvements, and chibicc python bindings
- python now mixes audio 10x faster - python octal notation is restored - chibicc now builds code 3x faster - chibicc now has help documentation - chibicc can now generate basic python bindings - linenoise now supports some paredit-like features See #141
This commit is contained in:
parent
28997f3acb
commit
7061c79c22
121 changed files with 5272 additions and 1928 deletions
1
third_party/python/Lib/test/test_class.py
vendored
1
third_party/python/Lib/test/test_class.py
vendored
|
@ -490,6 +490,7 @@ class ClassTests(unittest.TestCase):
|
|||
|
||||
self.assertRaises(TypeError, hash, C2())
|
||||
|
||||
@unittest.skipIf(cosmo.MODE == 'tiny', "no stack awareness in tiny mode")
|
||||
def testSFBug532646(self):
|
||||
# Test for SF bug 532646
|
||||
|
||||
|
|
4
third_party/python/Lib/test/test_codecs.py
vendored
4
third_party/python/Lib/test/test_codecs.py
vendored
|
@ -1331,7 +1331,7 @@ class EscapeDecodeTest(unittest.TestCase):
|
|||
check(br"[\x410]", b"[A0]")
|
||||
for i in range(97, 123):
|
||||
b = bytes([i])
|
||||
if b not in b'abfnrtvx':
|
||||
if b not in b'abfnrtvxe': # [jart] support \e
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
check(b"\\" + b, b"\\" + b)
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
|
@ -2603,7 +2603,7 @@ class UnicodeEscapeTest(unittest.TestCase):
|
|||
check(br"\U0001d120", "\U0001d120")
|
||||
for i in range(97, 123):
|
||||
b = bytes([i])
|
||||
if b not in b'abfnrtuvx':
|
||||
if b not in b'abfnrtuvxe': # [jart] support \e
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
check(b"\\" + b, "\\" + chr(i))
|
||||
if b.upper() not in b'UN':
|
||||
|
|
8
third_party/python/Lib/test/test_compile.py
vendored
8
third_party/python/Lib/test/test_compile.py
vendored
|
@ -163,8 +163,12 @@ if 1:
|
|||
for arg in ["077787", "0xj", "0x.", "0e", "090000000000000",
|
||||
"080000000000000", "000000000000009", "000000000000008",
|
||||
"0b42", "0BADCAFE", "0o123456789", "0b1.1", "0o4.2",
|
||||
"0b101j2", "0o153j2", "0b100e1", "0o777e1", "0777",
|
||||
"000777", "000000000000007"]:
|
||||
"0b101j2", "0o153j2", "0b100e1", "0o777e1",
|
||||
# [jart] restore octal
|
||||
# "0777",
|
||||
# "000777",
|
||||
# "000000000000007",
|
||||
]:
|
||||
self.assertRaises(SyntaxError, eval, arg)
|
||||
|
||||
self.assertEqual(eval("0xff"), 255)
|
||||
|
|
2
third_party/python/Lib/test/test_fileio.py
vendored
2
third_party/python/Lib/test/test_fileio.py
vendored
|
@ -177,7 +177,7 @@ class AutoFileTests:
|
|||
finally:
|
||||
os.close(fd)
|
||||
|
||||
# @unittest.skipUnless(cosmo.MODE == "dbg", "disabled recursion checking")
|
||||
@unittest.skipIf(cosmo.MODE == 'tiny', "no stack awareness in tiny mode")
|
||||
def testRecursiveRepr(self):
|
||||
# Issue #25455
|
||||
with swap_attr(self.f, 'name', self.f):
|
||||
|
|
1
third_party/python/Lib/test/test_plistlib.py
vendored
1
third_party/python/Lib/test/test_plistlib.py
vendored
|
@ -814,6 +814,7 @@ class TestBinaryPlistlib(unittest.TestCase):
|
|||
b = plistlib.loads(plistlib.dumps(a, fmt=plistlib.FMT_BINARY))
|
||||
self.assertIs(b['x'], b)
|
||||
|
||||
@unittest.skipIf(cosmo.MODE == 'tiny', "no stack awareness in tiny mode")
|
||||
def test_deep_nesting(self):
|
||||
for N in [300, 100000]:
|
||||
chunks = [b'\xa1' + (i + 1).to_bytes(4, 'big') for i in range(N)]
|
||||
|
|
4
third_party/python/Lib/test/test_scratch.py
vendored
4
third_party/python/Lib/test/test_scratch.py
vendored
|
@ -8,10 +8,10 @@ exit1 = cosmo.exit1
|
|||
|
||||
class BooTest(unittest.TestCase):
|
||||
def test_boo(self):
|
||||
pass
|
||||
# cosmo.ftrace()
|
||||
# chr(33)
|
||||
# eval('0')
|
||||
# exit1()
|
||||
pass
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue