Adjust testcase generator to remove unneeded whitespace

This commit is contained in:
Dustin Spicuzza 2022-12-06 07:46:16 -05:00
parent ba4222560f
commit 2192a92003

View File

@ -60,14 +60,14 @@ def gentest(infile: str, name: str, outfile: str, verbose: bool) -> None:
stmt = nondefault_repr(data)
content = content.replace("\n", "\n ")
content = ("\n" + content.strip()).replace("\n", "\n ")
content = "\n".join(l.rstrip() for l in content.splitlines())
stmt = inspect.cleandoc(
f'''
def test_{name}() -> None:
content = """
{content}
content = """{content}
"""
data = parse_string(content, cleandoc=True)