Title: Move all stdlib tests in the test package · Issue #93839 · python/cpython · GitHub
Open Graph Title: Move all stdlib tests in the test package · Issue #93839 · python/cpython
X Title: Move all stdlib tests in the test package · Issue #93839 · python/cpython
Description: Currently, Python tests are scattered in multiple directories: Lib/test/ (main one) Lib/ctypes/test/ Lib/distutils/tests/ Lib/idlelib/idle_test/ Lib/lib2to3/tests/ Lib/tkinter/test/ Lib/unittest/test/ idlelib, ctypes, lib2to3, tkinter, u...
Open Graph Description: Currently, Python tests are scattered in multiple directories: Lib/test/ (main one) Lib/ctypes/test/ Lib/distutils/tests/ Lib/idlelib/idle_test/ Lib/lib2to3/tests/ Lib/tkinter/test/ Lib/unittest/te...
X Description: Currently, Python tests are scattered in multiple directories: Lib/test/ (main one) Lib/ctypes/test/ Lib/distutils/tests/ Lib/idlelib/idle_test/ Lib/lib2to3/tests/ Lib/tkinter/test/ Lib/unittest/te...
Opengraph URL: https://github.com/python/cpython/issues/93839
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Move all stdlib tests in the test package","articleBody":"Currently, Python tests are scattered in multiple directories:\r\n\r\n* Lib/test/ (main one)\r\n* Lib/ctypes/test/\r\n* Lib/distutils/tests/\r\n* Lib/idlelib/idle_test/\r\n* Lib/lib2to3/tests/\r\n* Lib/tkinter/test/\r\n* Lib/unittest/test/\r\n\r\nidlelib, ctypes, lib2to3, tkinter, unittest and distutils have their tests under their own packages. It causes multiple issues:\r\n\r\n* As a maintainer of Python, I have to look into these directories manually when refactoring \"Python tests\" (I cannot just look into Lib/test/).\r\n* Linux distributions have to manually put these directories into a separated packages if they want to make the main \"python\" package smaller, to put python tests into a separated package.\r\n* Makefile is more complicated since tests are installed separately, and so these directories should be listed explicitly in the ``TESTSUBDIRS`` variable.\r\n* Tools/scripts/generate_stdlib_module_names.py excludes manually these modules, since sys.stdlib_module_names excludes test modules.\r\n\r\nI propose to move ctypes, idlelib, tkinter and unittest tests under Lib/test/.\r\n\r\nFor distutils and lib2to3, maybe we can just leave them where they are, since both modules are deprecated. distutils should be removed in Python 3.12. lib2to3 is scheduled for removal in Python 3.13.\r\n\r\nDo you think that it's worth it to move these directories?","author":{"url":"https://github.com/vstinner","@type":"Person","name":"vstinner"},"datePublished":"2022-06-15T09:59:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":15},"url":"https://github.com/93839/cpython/issues/93839"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:08a833e5-fbdb-069a-758b-3b570d28eb82 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A6B0:172536:57037:7729F:69695088 |
| html-safe-nonce | 89d27a7ad1115432ce8db7fe878f9c562aa54c1aa1c7d719f6c1c7af74675a8f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNkIwOjE3MjUzNjo1NzAzNzo3NzI5Rjo2OTY5NTA4OCIsInZpc2l0b3JfaWQiOiIzMDUyMTMzMzExNDA0NjU4ODI0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9bd211b0cf7e4eb1889661d8448d1c29b37efa7b21851f3968d118ae2ddf1823 |
| hovercard-subject-tag | issue:1271983348 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/93839/issue_layout |
| twitter:image | https://opengraph.githubassets.com/11eca64b43e60df0b4863db43ea1793553d854da27f63230018756591831e0f2/python/cpython/issues/93839 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/11eca64b43e60df0b4863db43ea1793553d854da27f63230018756591831e0f2/python/cpython/issues/93839 |
| og:image:alt | Currently, Python tests are scattered in multiple directories: Lib/test/ (main one) Lib/ctypes/test/ Lib/distutils/tests/ Lib/idlelib/idle_test/ Lib/lib2to3/tests/ Lib/tkinter/test/ Lib/unittest/te... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vstinner |
| hostname | github.com |
| expected-hostname | github.com |
| None | 54182691a21263b584d2e600b758e081b0ff1d10ffc0d2eefa51cf754b43b51d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d69ac0477df0f87da03b8b06cebd187012d7a930 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width