enable more CPython tests

Merged
DA
4d ago
+803-433

Just proceeding with locking down / testing the implementation.


Summary by cubic

Enables 9 more CPython stdlib test suites and lands the runtime features they exercise: modular inverses in pow(), arbitrary-precision randrange(), and descriptor type checking.

Behavior changes

  • pow(base, negative_exp, mod) now computes the modular inverse like CPython instead of raising ValueError.
  • randrange() accepts bounds and steps larger than 64-bit; only randint keeps the 64-bit limit.
  • randrange() empty-range errors now format the original arguments, matching CPython.
  • builtins stub models staticmethod, classmethod, and delattr, and the checker resolves class and static method access through the descriptors.
  • unittest stubs return Never from fail and skipTest, and assertRaises contexts expose the caught exception.

CPython suites

  • Vendors test_dictcomps, test_errno, test_int_literal, test_keywordonlyarg, test_pow, test_strftime, test_tomllib, test_unary, and test_unicode_identifiers.
  • New patches defer imports Monty cannot load and annotate deliberate type errors; skip entries cover unsupported methods.
  • The suite runner buffers output so passing tests no longer spam the log.