Name Description Size
README.txt Supporting modules for GYP testing. 542
TestCmd.py 52377
TestCommon.py TestCommon.py: a testing framework for commands and scripts with commonly useful error handling The TestCommon module provides a simple, high-level interface for writing tests of executable commands and scripts, especially commands and scripts that interact with the file system. All methods throw exceptions and exit on failure, with useful error messages. This makes a number of explicit checks unnecessary, making the test scripts themselves simpler to write and easier to read. The TestCommon class is a subclass of the TestCmd class. In essence, TestCommon is a wrapper that handles common TestCmd error conditions in useful ways. You can use TestCommon directly, or subclass it for your program and add additional (or override) methods to tailor it to your program's specific needs. Alternatively, the TestCommon class serves as a useful example of how to define your own TestCmd subclass. As a subclass of TestCmd, TestCommon provides access to all of the variables and methods from the TestCmd module. Consequently, you can use any variable or method documented in the TestCmd module without having to explicitly import TestCmd. A TestCommon environment object is created via the usual invocation: import TestCommon test = TestCommon.TestCommon() You can use all of the TestCmd keyword arguments when instantiating a TestCommon object; see the TestCmd documentation for details. Here is an overview of the methods and keyword arguments that are provided by the TestCommon class: test.must_be_writable('file1', ['file2', ...]) test.must_contain('file', 'required text\n') test.must_contain_all_lines(output, lines, ['title', find]) test.must_contain_any_line(output, lines, ['title', find]) test.must_exist('file1', ['file2', ...]) test.must_match('file', "expected contents\n") test.must_not_be_writable('file1', ['file2', ...]) test.must_not_contain('file', 'banned text\n') test.must_not_contain_any_line(output, lines, ['title', find]) test.must_not_exist('file1', ['file2', ...]) test.run(options = "options to be prepended to arguments", stdout = "expected standard output from the program", stderr = "expected error output from the program", status = expected_status, match = match_function) The TestCommon module also provides the following variables TestCommon.python_executable TestCommon.exe_suffix TestCommon.obj_suffix TestCommon.shobj_prefix TestCommon.shobj_suffix TestCommon.lib_prefix TestCommon.lib_suffix TestCommon.dll_prefix TestCommon.dll_suffix 21976
TestGyp.py TestGyp.py: a testing framework for GYP integration tests. 44707
TestMac.py TestMac.py: a collection of helper function shared between test on Mac OS X. 2617
TestWin.py TestWin.py: a collection of helpers for testing on Windows. 3196