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

serhiy-storchaka webhook-mailer at python.org
Thu Nov 10 01:54:46 EST 2022


https://github.com/python/cpython/commit/f883b7f8ee3209b52863fc662343c8cd81abdc59
commit: f883b7f8ee3209b52863fc662343c8cd81abdc59
branch: main
author: Serhiy Storchaka <storchaka at gmail.com>
committer: serhiy-storchaka <storchaka at gmail.com>
date: 2022-11-10T08:54:37+02:00
summary:

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

Move some C API tests into Lib/test/test_capi/.

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