-
Notifications
You must be signed in to change notification settings - Fork 190
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
Fix toml-test scripts #433
Conversation
# e=0 | ||
# toml-test ./tests/decoding_test.py || e=1 | ||
# toml-test -encoder ./tests/encoding_test.py || e=1 | ||
# exit $e |
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.
Didn't test this bit, but should be alright. You can add expected test failures with something like:
skip_dec=(
-skip test1
-skip test2
)
toml-test -skip $skip_dec[@] ./tests/decoding_test.py || e=1
Generate a list with something like:
toml-test -color never ./tests/decoding_test.py |& grep -a FAIL | sed 's/FAIL/-skip/'
tests/decoding_test.py
Outdated
return {'type': 'string', 'value': value} | ||
elif isinstance(value, bool): | ||
return {'type': 'bool', 'value': str(value).lower()} | ||
elif isinstance(value, int): | ||
return {'type': 'integer', 'value': str(value)} | ||
elif isinstance(value, long): | ||
elif isinstance(value, int): |
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.
Looks like this is a duplicate elif block with python2 long changed to int for python3.
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.
Cheers, fixed it.
Update tests/decoding_test.py to use the format used by the current version of toml-test. I also removed Python 2 support (my distro doesn't ship it, so I can't test it). Also add tests/encoding_test.py for encoder tests Still quite a few failures, mostly because it looks like it hasn't been updated to use 1.0 yet: % toml-test ./decoding_test.py | tail -n2 valid tests: 139 passed, 18 failed invalid tests: 230 passed, 53 failed % toml-test ./encoding_test.py -encoder | tail -n1 encoder tests: 146 passed, 11 failed
Merged. Thanks! |
Update tests/decoding_test.py to use the format used by the current version of toml-test. I also removed Python 2 support (my distro doesn't ship it, so I can't test it).
Also add tests/encoding_test.py for encoder tests
Still quite a few failures, mostly because it looks like it hasn't been updated to use 1.0 yet: