]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-105751: test_ctypes avoids the operator module (GH-105797)
authorVictor Stinner <vstinner@python.org>
Wed, 14 Jun 2023 21:29:05 +0000 (23:29 +0200)
committerGitHub <noreply@github.com>
Wed, 14 Jun 2023 21:29:05 +0000 (21:29 +0000)
commit5ab13c5f97aa5226c49052f1ad19a8c97a3d7cdf
treef5e20900e6d348fff79c9b28c31a63fbb4871d8b
parente7507bd131fbfbb49a6819a0d5ad5dd1e21b48cd
gh-105751: test_ctypes avoids the operator module (GH-105797)

* Replace operator.delitem(obj, index) with "del obj[index]".
* Replace operator.setitem(obj, index, value) with
  "obj[index] = value".
* Replace delattr(obj, "attr) with "del obj.attr".
* Replace grc() with sys.getrefcount() for readability.
Lib/test/test_ctypes/test_arrays.py
Lib/test/test_ctypes/test_callbacks.py
Lib/test/test_ctypes/test_delattr.py
Lib/test/test_ctypes/test_internals.py
Lib/test/test_ctypes/test_keeprefs.py
Lib/test/test_ctypes/test_pointers.py
Lib/test/test_ctypes/test_python_api.py
Lib/test/test_ctypes/test_refcounts.py
Lib/test/test_ctypes/test_slicing.py
Lib/test/test_ctypes/test_stringptr.py