class PytypeTest(test_base.UnitTest): (source)
Integration test for pytype.
Class Method | set |
Undocumented |
Method | assert |
Undocumented |
Method | assert |
Undocumented |
Method | assert |
Check that the output state matches expectations. |
Method | generate |
Undocumented |
Method | set |
Undocumented |
Method | tear |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Test for --generate-builtins. |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Test pytype on a real-world program. |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Basic unit test (smoke test) for _run_pytype. |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Test for --generate-builtins. |
Constant | INCLUDE |
Undocumented |
Instance Variable | errors |
Undocumented |
Instance Variable | pytype |
Undocumented |
Instance Variable | returncode |
Undocumented |
Instance Variable | stderr |
Undocumented |
Instance Variable | stdout |
Undocumented |
Instance Variable | tmp |
Undocumented |
Method | _check |
Undocumented |
Method | _create |
Undocumented |
Method | _data |
Undocumented |
Method | _infer |
Undocumented |
Method | _make |
Undocumented |
Method | _make |
Undocumented |
Method | _parse |
A wrapper for parser.parse_string that inserts the python version. |
Method | _reset |
Undocumented |
Method | _run |
A single command-line call to the pytype binary. |
Method | _setup |
Undocumented |
Method | _tmp |
Undocumented |
Check that the output state matches expectations. If, for example, you expect the program to print something to stdout and nothing to stderr before exiting with an error code, you would write assertOutputStateMatches(stdout=True, stderr=False, returncode=True). Args: **has_output: Whether each output type should have output.
A single command-line call to the pytype binary. Typically you'll want to use _CheckTypesAndErrors or _InferTypesAndCheckErrors, which will set up the command-line arguments properly and check that the errors file is in the right state after the call. (The errors check is bundled in to avoid the user forgetting to call assertHasErrors() with no arguments when expecting no errors.) Args: pytype_args_dict: A dictionary of the arguments to pass to pytype, minus the binary name. For example, to run pytype simple.py --output=- the arguments should be {"simple.py": self.INCLUDE, "--output": "-"}