summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_clinic.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-42398: Fix "make regen-all" race condition (GH-23362)Victor Stinner2020-11-181-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a race condition in "make regen-all" when make -jN option is used to run jobs in parallel. The clinic.py script now only use atomic write to write files. Moveover, generated files are now left unchanged if the content does not change, to not change the file modification time. The "make regen-all" command runs "make clinic" and "make regen-importlib" targets: * "make regen-importlib" builds object files (ex: Modules/_weakref.o) from source files (ex: Modules/_weakref.c) and clinic files (ex: Modules/clinic/_weakref.c.h) * "make clinic" always rewrites all clinic files (ex: Modules/clinic/_weakref.c.h) Since there is no dependency between "clinic" and "regen-importlib" Makefile targets, these two targets can be run in parallel. Moreover, half of clinic.py file writes are not atomic and so there is a race condition when "make regen-all" runs jobs in parallel using make -jN option (which can be passed in MAKEFLAGS environment variable). Fix clinic.py to make all file writes atomic: * Add write_file() function to ensure that all file writes are atomic: write into a temporary file and then use os.replace(). * Moreover, write_file() doesn't recreate or modify the file if the content does not change to avoid modifying the file modification file. * Update test_clinic to verify these assertions with a functional test. * Remove Clinic.force attribute which was no longer used, whereas Clinic.verify remains useful.
* bpo-40275: Use new test.support helper submodules in tests (GH-21448)Hai Shi2020-08-031-1/+2
|
* bpo-36876: Add a tool that identifies unsupported global C variables. (#15877)Eric Snow2019-09-111-10/+3
|
* bpo-35578: Add an example file for testing Argument Clinic converters. ↵Serhiy Storchaka2018-12-251-1/+17
| | | | (GH-11306)
* bpo-26901: Fix the Argument Clinic test suite (GH-8879)Victor Stinner2018-09-031-0/+802
* Fix Tools/clinic/clinic_test.py: add missing FakeClinic.destination_buffers attribute and pass a file argument to Clinic(). * Rename Tools/clinic/clinic_test.py to Lib/test/test_clinic.py: add temporary Tools/clinic/ to sys.path to import the clinic module. Co-Authored-By: Pablo Galindo <pablogsal@gmail.com>