Skip to main content

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.

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.

Project details


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.3.17.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

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

checktestdata-2026.3.17-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: checktestdata-2026.3.17.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

Hashes for checktestdata-2026.3.17.tar.gz
Algorithm Hash digest
SHA256 73e2df1e6f864e6c6099d5d1426f36e3201be95c6ebf3abac10a097eba1bb39a
MD5 1a6322145c882e842e4d11cb5a67b6ad
BLAKE2b-256 29286252eacf2a48ba258a2e49307a09a7c9c37a8aaeaaa5d8886c43053ea8e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for checktestdata-2026.3.17.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.3.17-py3-none-any.whl.

File metadata

File hashes

Hashes for checktestdata-2026.3.17-py3-none-any.whl
Algorithm Hash digest
SHA256 eb44e36ce7046103d43e056c018edbd9a5c9d3b47fade35d8516fff247ba7ee7
MD5 14d0bd837c9a47f80eca1794ac7ab077
BLAKE2b-256 65295f6fa186dd9be1a5bccc176914f29fa83c4cf8cf07fd0c58c46f1c40c45c

See more details on using hashes here.

Provenance

The following attestation bundles were made for checktestdata-2026.3.17-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.

Supported by

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