Skip to main content

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.

— Checktestdata

This is a Python 3.10 compatible reimplementation of the checktestdata program.

[!NOTE] As of now, the python implementation only supports strict file validation. The arguments whitespace-ok and generate are not supported.

Documentation

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 -d to 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.

Metadata

Release files for checktestdata 2026.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for checktestdata 2026.9.1
File Size Uploaded
checktestdata-2026.9.1.tar.gz 21.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for checktestdata 2026.9.1
File Interpreter ABI Platform
checktestdata-2026.9.1-py3-none-any.whl Python 3 none any Details

Total release size: 40.6 kB

Release files / checktestdata-2026.9.1.tar.gz

Download URL checktestdata-2026.9.1.tar.gz
Size 21.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b289b5acdc46bd891120d2131ee69710d8e7de5ccb570bb23359d626cd567fb0
BLAKE2b-256 checksum
How to use checksums
1f636ebe7854cdd307d1ecc35faeceefb06d65d8df1a36629bd4f53e3b75a27a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release files / checktestdata-2026.9.1-py3-none-any.whl

Download URL checktestdata-2026.9.1-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63449e7156f23c30c5d6220d85b575a0bd2b835b56c42914a3d3362c4bf465d3
BLAKE2b-256 checksum
How to use checksums
a5c4b2e8135fd08806e757f1fa63020d2c880fd309d0371b5f373d23f39c4b12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2026.9.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page