-
Notifications
You must be signed in to change notification settings - Fork 135
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
[issue-573] unify parse_from_file
tests for all formats
#574
[issue-573] unify parse_from_file
tests for all formats
#574
Conversation
54bfc9d
to
83ff11a
Compare
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.
Thanks! Two comments from my side, that are rather optional.
class TestParseFromFile: | ||
def test_parse_from_file_not_found(self, parser, format_name, extension): | ||
with pytest.raises(FileNotFoundError) as err: | ||
wrong_file_path = os.path.join(os.path.dirname(__file__), "hnjfkjsedhnflsiafg.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.
You could use extension
here. Doesn't make a difference but feels more consistent regarding the different parsers
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.
This feels necessary and unnecessary at the same time :D
I'll add it
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.
I am wondering if we really need the folder formats
. Right now this gives an additional depth, that is not really needed.
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.
I had the same thought. I'll remove it for now.
Signed-off-by: Armin Tänzer <armin.taenzer@tngtech.com>
83ff11a
to
5feba30
Compare
Signed-off-by: Armin Tänzer <armin.taenzer@tngtech.com>
0a28990
to
8ae5a89
Compare
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.
LGTM!
Fixes #573.
I went a little further and unified the general parsing tests for all formats into a single test class, also adding the v2.2 tag-value example.