Skip to content

🧪 A test framework for clingo programs

License

Notifications You must be signed in to change notification settings

potassco/clintest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.