Skip to main content

A test framework for clingo programs

Project description

clintest

clintest is a Python framework that enables you to write efficient unit tests for clingo programs quickly. Devising and running multiple tests is a simple as:

from clintest.test import Assert, And
from clintest.quantifier import All, Any
from clintest.assertion import Contains
from clintest.solver import Clingo

solver = Clingo("0", "a. {b}.")
test = And(
    Assert(Any(), Contains("a")),
    Assert(All(), Contains("b")),
    Assert(Any(), Contains("c")),
)

solver.solve(test)
test.assert_()

For details, please read the documentation.

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

clintest-0.5.0.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

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

clintest-0.5.0-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file clintest-0.5.0.tar.gz.

File metadata

  • Download URL: clintest-0.5.0.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for clintest-0.5.0.tar.gz
Algorithm Hash digest
SHA256 be5d82625be6c4dbbcabd9e89909c4619b21353ea235b279904764083eac281d
MD5 40e74040678f787f71b2b10023263e7e
BLAKE2b-256 36c01c7760913203bf9a617e776c7bf73c675933b4270ba0dd41ea82cce68880

See more details on using hashes here.

File details

Details for the file clintest-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: clintest-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for clintest-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff2f1ae6690e1a7929d50d920320765d8b7a3c5af85940ae0bec72a046861867
MD5 b1e683441ae24dc1308f6bc69cce7de2
BLAKE2b-256 9d2ca72ff37346f871d8f6b85d3edbe727ad4dc0baa35c85500a33e7d4b0e7e4

See more details on using hashes here.

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