cpython/Lib/test/test_capi
Sergey B Kirpichev 987311d42e
gh-69639: Add mixed-mode rules for complex arithmetic (C-like) (GH-124829)
"Generally, mixed-mode arithmetic combining real and complex variables should
be performed directly, not by first coercing the real to complex, lest the sign
of zero be rendered uninformative; the same goes for combinations of pure
imaginary quantities with complex variables." (c) Kahan, W: Branch cuts for
complex elementary functions.

This patch implements mixed-mode arithmetic rules, combining real and
complex variables as specified by C standards since C99 (in particular,
there is no special version for the true division with real lhs
operand).  Most C compilers implementing C99+ Annex G have only these
special rules (without support for imaginary type, which is going to be
deprecated in C2y).
2024-11-26 17:57:39 +02:00
..
__init__.py gh-116303: Skip test module dependent tests if test modules are unavailable (#117341) 2024-04-03 15:11:36 +02:00
__main__.py
check_config.py gh-120417: Add #noqa: F401 to tests (#120627) 2024-06-18 15:51:47 +00:00
test_abstract.py gh-111495: Add tests for PyNumber C API (#111996) 2024-08-26 15:59:22 +02:00
test_bytearray.py gh-116417: Move 4 limited C API test files to _testlimitedcapi (#116571) 2024-03-11 10:28:16 +00:00
test_bytes.py gh-121645: Add PyBytes_Join() function (#121646) 2024-08-30 12:57:33 +00:00
test_codecs.py gh-111495: improve test coverage of codecs C API (GH-126030) 2024-11-01 13:28:18 +00:00
test_complex.py gh-69639: Add mixed-mode rules for complex arithmetic (C-like) (GH-124829) 2024-11-26 17:57:39 +02:00
test_config.py gh-115999: Implement thread-local bytecode and enable specialization for `BINARY_OP` (#123926) 2024-11-04 11:13:32 -08:00
test_dict.py gh-115142: Skip ``test_capi.test_dict.py`` if ``_testcapi`` and ``_testlimitedcapi`` are not available (GH-117588) 2024-04-10 16:32:57 +02:00
test_eval.py gh-111495: Add more tests on PyEval C APIs (#122789) 2024-08-08 14:16:20 +02:00
test_eval_code_ex.py gh-117694: Improve tests for PyEval_EvalCodeEx() (GH-117695) 2024-04-15 12:44:54 +03:00
test_exceptions.py Fix typos in comments (#123201) 2024-08-21 12:49:23 +00:00
test_float.py gh-116417: Move limited C API abstract.c tests to _testlimitedcapi (#116986) 2024-03-19 10:44:13 +00:00
test_getargs.py gh-121039: add Floats/ComplexesAreIdenticalMixin to test.support.testcase (GH-121071) 2024-09-08 16:01:54 +03:00
test_hash.py gh-122854: Add Py_HashBuffer() function (#122855) 2024-08-30 15:42:27 +00:00
test_immortal.py
test_list.py gh-111495: Add tests for PyTuple C API (#118757) 2024-08-26 11:57:52 +02:00
test_long.py gh-126061: Add PyLong_IsPositive/Zero/Negative() functions (#126065) 2024-11-12 14:18:06 +01:00
test_mem.py Fix incorrect usage of ``support.requires_gil_enabled`` (#118170) 2024-04-25 11:11:59 -04:00
test_misc.py gh-125900: Clean-up logic around immortalization in free-threading (#125901) 2024-10-24 18:09:59 -04:00
test_number.py gh-111495: Remove test_capi test_rshift_print() (#123338) 2024-08-26 14:39:32 +00:00
test_object.py Fix intermittent failures for the `PyUnstable_Object_EnableDeferredRefcount` tests (GH-126849) 2024-11-15 14:03:46 +01:00
test_opt.py GH-126892: Reset warmup counters when JIT compiling code (GH-126893) 2024-11-20 08:11:25 -08:00
test_pyatomic.py
test_run.py gh-116180: Check the globals argument in PyRun_* C API (GH-116637) 2024-05-02 16:43:03 +03:00
test_set.py gh-111495: Add tests for PyTuple C API (#118757) 2024-08-26 11:57:52 +02:00
test_structmembers.py gh-120417: Remove unused imports in tests (part 1) (#120629) 2024-06-17 21:05:56 +02:00
test_sys.py gh-116417: Move 4 limited C API test files to _testlimitedcapi (#116571) 2024-03-11 10:28:16 +00:00
test_time.py gh-111495: Add tests for PyTuple C API (#118757) 2024-08-26 11:57:52 +02:00
test_tuple.py gh-111495: Add tests for PyTuple C API (#118757) 2024-08-26 11:57:52 +02:00
test_type.py gh-121654: Add PyType_Freeze() function (#122457) 2024-10-25 11:12:48 +02:00
test_unicode.py gh-124502: Add PyUnicode_Equal() function (#124504) 2024-10-07 21:24:53 +00:00
test_watchers.py gh-125900: Clean-up logic around immortalization in free-threading (#125901) 2024-10-24 18:09:59 -04:00