A python reimplementation of Checktestdata (https://github.com/DOMjudge/checktestdata).
Project description
Python Checktestdata
Checktestdata is a tool to verify the syntactical integrity of test cases in programming contests like the ACM ICPC. It allows you to specify a simple grammar for your testdata input files, according to which the testdata is checked.
This is a Python 3.10 compatible reimplementation of the checktestdata program.
[!NOTE] As of now, the python implementation on supports strict file validation. The arguments
whitespace-okandgenerateare not supported.
Grammar specification
The language specification can be found in the domjudge Checktestdata repository.
Installation
Requirements:
- PyPy >= v7.3.15 (preferred)
- CPython >= 3.10 (alternative)
The package can be installed directly from pypi:
pypy3 -m ensurepip
pypy3 -m pip install checktestdata
pip install checktestdata
Use
You can use this program to run .ctd validators in the same way as the checktestdata binary:
pyctd validator.ctd [-d | --debug] < testcase
You can also use the programm to convert .ctd files into standalone python applications:
pyctd validator.ctd --convert [name] [-d | --debug]
[!TIP] The generated validator might not be easy to read, cosider adding
-dto include the original code as comments.
Extensions
This checktesdata implementation supports the --constraints_file argument and can be used with BAPCtools to check the constraints of a problem.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file checktestdata-2026.3.8.tar.gz.
File metadata
- Download URL: checktestdata-2026.3.8.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab77392c98f3c278e9c73d4d70ccf22a8e8d669025684bca5fe26f302a6ef86f
|
|
| MD5 |
75e8270bf0d724502a604ce72930070b
|
|
| BLAKE2b-256 |
94bb53e4956de1aed0c4937343ae9b12e773ad4b118db9360372ee1564293467
|
Provenance
The following attestation bundles were made for checktestdata-2026.3.8.tar.gz:
Publisher:
release.yml on mzuenni/pyctd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
checktestdata-2026.3.8.tar.gz -
Subject digest:
ab77392c98f3c278e9c73d4d70ccf22a8e8d669025684bca5fe26f302a6ef86f - Sigstore transparency entry: 1077007923
- Sigstore integration time:
-
Permalink:
mzuenni/pyctd@2c9f4ceaec9b47efcfa1cc2656109ed3e8114420 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mzuenni
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2c9f4ceaec9b47efcfa1cc2656109ed3e8114420 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file checktestdata-2026.3.8-py3-none-any.whl.
File metadata
- Download URL: checktestdata-2026.3.8-py3-none-any.whl
- Upload date:
- Size: 26.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d29af81278f1c670c50c00881aff70c48bd77ae3207e4970f458c84a669efe5d
|
|
| MD5 |
e39ff8942c572597d6df68c0e5cbbdf6
|
|
| BLAKE2b-256 |
c0dc3b9515e56b86cdecbe8d3110b9d0e9b76c582669505241e30d7718626a8d
|
Provenance
The following attestation bundles were made for checktestdata-2026.3.8-py3-none-any.whl:
Publisher:
release.yml on mzuenni/pyctd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
checktestdata-2026.3.8-py3-none-any.whl -
Subject digest:
d29af81278f1c670c50c00881aff70c48bd77ae3207e4970f458c84a669efe5d - Sigstore transparency entry: 1077007936
- Sigstore integration time:
-
Permalink:
mzuenni/pyctd@2c9f4ceaec9b47efcfa1cc2656109ed3e8114420 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mzuenni
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2c9f4ceaec9b47efcfa1cc2656109ed3e8114420 -
Trigger Event:
workflow_dispatch
-
Statement type: