(self, yaml_str: str, expect: str)
| 21 | |
| 22 | class TestCodegenModel(expecttest.TestCase): |
| 23 | def assertParseErrorInline(self, yaml_str: str, expect: str) -> None: |
| 24 | es = yaml.load(yaml_str, Loader=LineLoader) |
| 25 | try: |
| 26 | parse_native_yaml_struct(es, set()) |
| 27 | except AssertionError as e: |
| 28 | # hack to strip out the context |
| 29 | msg, _ = str(e).split(" in ", 2) |
| 30 | self.assertExpectedInline("\n".join(textwrap.wrap(msg)), expect, skip=1) |
| 31 | return |
| 32 | self.fail(msg="Did not raise when expected to") |
| 33 | |
| 34 | def assertUfuncErrorInline(self, yaml_str: str, expect: str) -> None: |
| 35 | # parse a single structured group out of the yaml to g |
no test coverage detected