class ParserTestBase(test_base.UnitTest): (source)
Known subclasses: pytype.pyi.entire_file_parser_test.EntireFileTest
, pytype.pyi.parser_test.AllTest
, pytype.pyi.parser_test.AnnotatedTest
, pytype.pyi.parser_test.AnyTest
, pytype.pyi.parser_test.CanonicalPyiTest
, pytype.pyi.parser_test.ClassIfTest
, pytype.pyi.parser_test.ClassTest
, pytype.pyi.parser_test.ConcatenateTest
, pytype.pyi.parser_test.ConditionTest
, pytype.pyi.parser_test.FunctionTest
, pytype.pyi.parser_test.HomogeneousTypeTest
, pytype.pyi.parser_test.IfTest
, pytype.pyi.parser_test.ImportTypeIgnoreTest
, pytype.pyi.parser_test.LiteralTest
, pytype.pyi.parser_test.MergeSignaturesTest
, pytype.pyi.parser_test.MethodAliasTest
, pytype.pyi.parser_test.NamedTupleTest
, pytype.pyi.parser_test.NewTypeTest
, pytype.pyi.parser_test.ParamSpecTest
, pytype.pyi.parser_test.ParserTest
, pytype.pyi.parser_test.PropertyDecoratorTest
, pytype.pyi.parser_test.QuotedTypeTest
, pytype.pyi.parser_test.TypedDictTest
, pytype.pyi.parser_test.TypeGuardTest
, pytype.pyi.parser_test.TypeMacroTest
, pytype.pyi.parser_test.UnionOrTest
Base class for pyi parsing tests.
Method | check |
Check the parsing of src. |
Method | check |
Check that parsing the src raises the expected error. |
Method | parse |
Undocumented |
Method | set |
Undocumented |
Instance Variable | options |
Undocumented |
pytype.pyi.parser_test.AllTest
Check the parsing of src. This checks that parsing the source and then printing the resulting AST results in the expected text. Args: src: A source string. expected: Optional expected result string. If not provided, src is used instead. The special value IGNORE can be used to skip checking the parsed results against expected text. prologue: An optional prologue to be prepended to the expected text before comparison. Useful for imports that are introduced during printing the AST. name: The name of the module. version: A python version tuple (None for default value). platform: A platform string (defaults to "linux"). Returns: The parsed pytd.TypeDeclUnit.