Undocumented
Function | assert |
Undocumented |
Function | assert |
Undocumented |
Function | assert |
Assert that two string arrays are equal. |
Function | assert |
Compare actual and expected targets (order sensitive). |
Function | assert |
Undocumented |
Function | check |
Undocumented |
Function | clean |
Remove common directory prefix from all strings in a. |
Function | find |
Undocumented |
Function | good |
Undocumented |
Function | local |
Temporary insert current directory into sys.path. |
Function | normalize |
Translate an array of error messages to use / as path separator. |
Function | normalize |
Normalize file output for comparison. |
Function | num |
Undocumented |
Function | num |
Undocumented |
Function | parse |
Parse comments like '# flags: --foo' in a test case. |
Function | perform |
Undocumented |
Function | retry |
Retry callback with exponential backoff when it raises OSError. |
Function | run |
Undocumented |
Function | show |
Align s1 and s2 so that the their first difference is highlighted. |
Function | split |
Returns a single list of string lines from the byte streams in args. |
Function | testfile |
Undocumented |
Function | typename |
Undocumented |
Function | update |
Undocumented |
Function | write |
Undocumented |
Constant | MIN |
Undocumented |
str
, expected: Iterable[ str]
, actual: Iterable[ str]
):
(source)
¶
Undocumented
Assert that two string arrays are equal. We consider "can't" and "cannot" equivalent, by replacing the former with the latter before comparing. Display any differences in a human-readable form.
DataDrivenTestCase
, step: int
, strip_prefix: str
= ''):
(source)
¶
Undocumented
Remove common directory prefix from all strings in a. This uses a naive string replace; it seems to work well enough. Also remove trailing carriage returns.
Temporary insert current directory into sys.path. This can be used by test cases that do runtime imports, for example by the stubgen tests.
str
, testcase: DataDrivenTestCase
, incremental_step: int
) -> Options
:
(source)
¶
Parse comments like '# flags: --foo' in a test case.
Retry callback with exponential backoff when it raises OSError. If the function still generates an error after max_wait seconds, propagate the exception. This can be effective against random file system operation failures on Windows.
Align s1 and s2 so that the their first difference is highlighted. For example, if s1 is 'foobar' and s2 is 'fobar', display the following lines: E: foobar A: fobar ^ If s1 and s2 are long, only display a fragment of the strings around the first difference. If s1 is very short, do nothing.