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.3.0.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

clintest-0.3.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: clintest-0.3.0.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for clintest-0.3.0.tar.gz
Algorithm Hash digest
SHA256 0905a4309f902a25c29275d5fddd60a6fec80e02b8ae00b7c7bb9c5b0f04b736
MD5 b3d7f90706f07b2f5d6a16fada740ab5
BLAKE2b-256 6eadd2d3766cd3bcef8fdc68cc8d3e67aa5ff6a3ab6e11bfcb45b4be39ab7460

See more details on using hashes here.

File details

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

File metadata

  • Download URL: clintest-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for clintest-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ca4990bc3b1f9b1d05a5334cb33ee3918ea8f76bda3dff14312dcc303cca501
MD5 6032ae9c1b8d45db2c322a099ce6e751
BLAKE2b-256 fe6b98112034c4f5a611b0cbc5897ea0ec6a13025477baf4915bb36aa569cd58

See more details on using hashes here.

Supported by

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