-
-
Notifications
You must be signed in to change notification settings - Fork 219
Extract the schema for tests into a JSON file. #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Will fix this issue: #94 Is the way I read the file to JSON idiomatic? |
} | ||
} | ||
|
||
TESTSUITE_SCHEMA = json.load(open("test-schema.json")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a with statement to not leave the file descriptor hanging around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also would be good to use a path relative to __file__
rather than relative to cwd.
Awesome! Thanks so much. Left 2 comments, lemme know if they're clear. |
How does that look? (force pushed) |
Why did you choose to add a function just to call it once right after :)? Sorry, I'm annoying :) |
Not at all, I'm enjoying the chance to re-learn some python. Using It happens whether I put everything on one line
Or two (the indentation of this is showing off -- I have the
Doesn't the value of an assignment have to be an expression, not a statement? That would explain the problem. |
Ah! Yes, it's a statement, which means you need to move the assignment within its body, e.g.:
|
Ohhhhhhhhhh! (Force pushed again) |
Looks great! Thanks! |
No description provided.