Skip to content
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

Update toml-test #222

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Update toml-test #222

wants to merge 3 commits into from

Conversation

arp242
Copy link

@arp242 arp242 commented Oct 13, 2023

This updates the test files from upstream; all additional tests are now also integrated upstream, so I removed them here. The only exception is the one that subseconds are truncated to microseconds as that's implementation defined behaviour, so I added a new unit test here.

The repo was moved from BurntSushi to toml-lang, so renamed a few things to reflect that. The iarna and "compliance" tests are no longer used, so simplify the code a bit as that doesn't need to be supported.

Make the script executable so it can be run with the toml-test runner:

% PYTHONPATH=./src toml-test ./tests/tomltest.py
toml-test v2023-10-13 [./tests/tomltest.py]: using embedded tests
  valid tests: 166 passed,  0 failed
invalid tests: 355 passed,  0 failed

This gives slightly nicer errors (IMHO), and also selfishly makes it a bit easier to keep the test matrix updated, as I won't have to include my own script and can just run this one.

I split this PR in two commits: the first one just updates the TOML and JSON files, and the second has all changes to the code. This way it's a bit easier to review.

arp242 and others added 3 commits October 13, 2023 14:11
This updates the test files from upstream; all additional tests are now
also integrated upstream, so I removed them here. The only exception is
the one that subseconds are truncated to microseconds as that's
implementation defined behaviour, so I added a new unit test here.

The repo was moved from BurntSushi to toml-lang, so renamed a few things
to reflect that. The iarna and "compliance" tests are no longer used, so
simplify the code a bit as that doesn't need to be supported.

Make the script executable so it can be run with the toml-test runner:

	% PYTHONPATH=./src toml-test ./tests/tomltest.py
	toml-test v2023-10-13 [./tests/tomltest.py]: using embedded tests
	  valid tests: 166 passed,  0 failed
	invalid tests: 355 passed,  0 failed

This gives slightly nicer errors (IMHO), and also selfishly makes it a
bit easier to keep the [test matrix] updated, as I won't have to include
my own script and can just run this one.

[test matrix]: https://arp242.github.io/toml-test-matrix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant