[Python-checkins] bpo-34272: Reorganize C API tests. (GH-8551)

miss-islington webhook-mailer at python.org
Sat Nov 12 12:36:47 EST 2022


https://github.com/python/cpython/commit/ecc164f350eb3bb10b81ade6132eed2946a26c6c
commit: ecc164f350eb3bb10b81ade6132eed2946a26c6c
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-11-12T09:36:42-08:00
summary:

bpo-34272: Reorganize C API tests. (GH-8551)


Move some C API tests into Lib/test/test_capi/.
(cherry picked from commit f883b7f8ee3209b52863fc662343c8cd81abdc59)

Co-authored-by: Serhiy Storchaka <storchaka at gmail.com>

files:
A Lib/test/test_capi/__init__.py
A Lib/test/test_capi/__main__.py
A Lib/test/test_capi/test_getargs.py
A Lib/test/test_capi/test_misc.py
A Lib/test/test_capi/test_structmembers.py
A Misc/NEWS.d/next/Tests/2018-07-29-15-59-51.bpo-34272.lVX2uR.rst
D Lib/test/test_capi.py
D Lib/test/test_getargs2.py
D Lib/test/test_structmembers.py

diff --git a/Lib/test/test_capi/__init__.py b/Lib/test/test_capi/__init__.py
new file mode 100644
index 000000000000..4b16ecc31156
--- /dev/null
+++ b/Lib/test/test_capi/__init__.py
@@ -0,0 +1,5 @@
+import os
+from test.support import load_package_tests
+
+def load_tests(*args):
+    return load_package_tests(os.path.dirname(__file__), *args)
diff --git a/Lib/test/test_capi/__main__.py b/Lib/test/test_capi/__main__.py
new file mode 100644
index 000000000000..05d01775ddf4
--- /dev/null
+++ b/Lib/test/test_capi/__main__.py
@@ -0,0 +1,3 @@
+import unittest
+
+unittest.main('test.test_capi')
diff --git a/Lib/test/test_getargs2.py b/Lib/test/test_capi/test_getargs.py
similarity index 100%
rename from Lib/test/test_getargs2.py
rename to Lib/test/test_capi/test_getargs.py
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi/test_misc.py
similarity index 100%
rename from Lib/test/test_capi.py
rename to Lib/test/test_capi/test_misc.py
diff --git a/Lib/test/test_structmembers.py b/Lib/test/test_capi/test_structmembers.py
similarity index 100%
rename from Lib/test/test_structmembers.py
rename to Lib/test/test_capi/test_structmembers.py
diff --git a/Misc/NEWS.d/next/Tests/2018-07-29-15-59-51.bpo-34272.lVX2uR.rst b/Misc/NEWS.d/next/Tests/2018-07-29-15-59-51.bpo-34272.lVX2uR.rst
new file mode 100644
index 000000000000..479299e54547
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2018-07-29-15-59-51.bpo-34272.lVX2uR.rst
@@ -0,0 +1 @@
+Some C API tests were moved into the new Lib/test/test_capi/ directory.



More information about the Python-checkins mailing list