Skip to content

Instantly share code, notes, and snippets.

@whtsky
Created January 19, 2021 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whtsky/dfb2bad47522e7dfbe1f3b34d27dbc64 to your computer and use it in GitHub Desktop.
Save whtsky/dfb2bad47522e7dfbe1f3b34d27dbc64 to your computer and use it in GitHub Desktop.
mypy test data to pytest-mypy-plugins
outputs=[]
with open('graphene_plugin.test', 'r') as f:
for x in f.read().strip().splitlines():
if x.startswith("[case "):
outputs.append(f"- case: {x.replace('[case', '').replace(']', '').strip()}")
outputs.append(" main: |")
elif x == "[out]":
outputs.append(" out: |")
else:
outputs.append(f" {x}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment