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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

checktestdata-2026.7.1.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

checktestdata-2026.7.1-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file checktestdata-2026.7.1.tar.gz.

File metadata

  • Download URL: checktestdata-2026.7.1.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for checktestdata-2026.7.1.tar.gz
Algorithm Hash digest
SHA256 0d16527e2f3da592d34afd39feb752376d6d5bf7eded4e19a5cec9daef16a134
MD5 c844874b190a4b5047a7bf14a84bcf23
BLAKE2b-256 ad939dacb16d56100b4c865347e842e558252efba9edccf6c6ea69cc3a754235

See more details on using hashes here.

Provenance

The following attestation bundles were made for checktestdata-2026.7.1.tar.gz:

Publisher: release.yml on mzuenni/pyctd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file checktestdata-2026.7.1-py3-none-any.whl.

File metadata

File hashes

Hashes for checktestdata-2026.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 693df568189f0fb2f450706e0d48e155db91fc7331c32816fd7db82a60a1ec3e
MD5 157ec2a2d47fe1973c63c19aa975c20a
BLAKE2b-256 23962212d2bf951245181a70fb7e3ed0baf37aa36393e688dfcd2a5d18bb5fc1

See more details on using hashes here.

Provenance

The following attestation bundles were made for checktestdata-2026.7.1-py3-none-any.whl:

Publisher: release.yml on mzuenni/pyctd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2026.7.1 This release

2 files

2026.7.0

2 files

2026.4.5

2 files

2026.4.4

2 files

2026.4.3

2 files

2026.4.2

2 files

2026.4.1

2 files

2026.4.0

2 files

2026.3.21

2 files

2026.3.20

2 files

2026.3.19

2 files

2026.3.18

2 files

2026.3.17

2 files

2026.3.16

2 files

2026.3.15

2 files

2026.3.14

2 files

2026.3.13

2 files

2026.3.12

2 files

2026.3.11

2 files

2026.3.10

2 files

2026.3.9

2 files

2026.3.8

2 files

2026.3.7

2 files

2026.3.6

2 files

2026.3.5

2 files

2026.3.4

2 files

2026.3.3

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page