module documentation

Support code for distutils test cases.

Class DummyCommand Class to store options for retrieval via set_undefined_options().
Class TempdirManager Mix-in class that handles temporary directories for test cases.
Function combine_markers 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_xxmodule_c Helper for tests that need the xxmodule.c source file.
Function fixup_build_ext Function needed to make build_ext tests pass.
Function _get_xxmodule_path Undocumented
def combine_markers(cls): (source)

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.

def copy_xxmodule_c(directory): (source)

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.

def fixup_build_ext(cmd): (source)

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.

def _get_xxmodule_path(): (source)

Undocumented