示例#1
0
def load_file(location):
    """Loads a boolean expression from a file."""
    location = os.path.dirname(__file__) + '/' + location
    with open(location) as f:
        s = f.read()

    return load(s)
示例#2
0
def test_f5():
    assert bool(dpll_satisfiable(load(f5)))
示例#3
0
def test_f4():
    assert not bool(dpll_satisfiable(load(f4)))
示例#4
0
def test_f3():
    assert bool(dpll_satisfiable(load(f3)))
示例#5
0
def test_f2():
    assert bool(dpll_satisfiable(load(f2)))
示例#6
0
def test_f1():
    assert bool(dpll_satisfiable(load(f1)))
示例#7
0
def test_f6():
    assert not bool(dpll2_satisfiable(load(f6)))
示例#8
0
def test_f6():
    assert not bool(dpll2_satisfiable(load(f6)))
示例#9
0
def test_f5():
    assert bool(dpll_satisfiable(load(f5)))
示例#10
0
def test_f4():
    assert not bool(dpll_satisfiable(load(f4)))
示例#11
0
def test_f3():
    assert bool(dpll_satisfiable(load(f3)))
示例#12
0
def test_f2():
    assert bool(dpll_satisfiable(load(f2)))
示例#13
0
def test_f1():
    assert bool(dpll_satisfiable(load(f1)))