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.4.0.tar.gz (15.0 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.4.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for clintest-0.4.0.tar.gz
Algorithm Hash digest
SHA256 06c5828b22ecd975d281c3bfbe88be4eacdbff8a0b5a863b322c0271beb1590b
MD5 6e8ddb082f7fe70a9baf3afdc84534cf
BLAKE2b-256 6e35a778ad442c77068da647084866c34a6efa994bdb51917ee09ecd9a440063

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for clintest-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 178603ca45c489f6dc7debd078952043705f4698cff6126a7c573c4982c107a4
MD5 a99cc39b411f1c281c21045ded2e8084
BLAKE2b-256 a0a00c8eb2581a3e4881df47e620a4cd55a91a42b4ae34e8effeda5142877f9d

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