Support code for distutils test cases.
Class |
|
Class to store options for retrieval via set_undefined_options(). |
Class |
|
Mix-in class that handles temporary directories for test cases. |
Function | combine |
pytest will honor markers as found on the class, but when markers are on multiple subclasses, only one appears. Use this decorator to combine those markers. |
Function | copy |
Helper for tests that need the xxmodule.c source file. |
Function | fixup |
Function needed to make build_ext tests pass. |
Function | _get |
Undocumented |
pytest will honor markers as found on the class, but when markers are on multiple subclasses, only one appears. Use this decorator to combine those markers.
Helper for tests that need the xxmodule.c source file. Example use: def test_compile(self): copy_xxmodule_c(self.tmpdir) self.assertIn('xxmodule.c', os.listdir(self.tmpdir)) If the source file can be found, it will be copied to *directory*. If not, the test will be skipped. Errors during copy are not caught.
Function needed to make build_ext tests pass. When Python was built with --enable-shared on Unix, -L. is not enough to find libpython<blah>.so, because regrtest runs in a tempdir, not in the source directory where the .so lives. When Python was built with in debug mode on Windows, build_ext commands need their debug attribute set, and it is not done automatically for some reason. This function handles both of these things. Example use: cmd = build_ext(dist) support.fixup_build_ext(cmd) cmd.ensure_finalized() Unlike most other Unix platforms, Mac OS X embeds absolute paths to shared libraries into executables, so the fixup is not needed there.