Beispiel #1
0
def test_Gens_preprocess():
    assert not Gens.preprocess((None, ))
    assert Gens.preprocess((x, y, z)) == (x, y, z)

    a = Symbol('a', commutative=False)

    pytest.raises(GeneratorsError, lambda: Gens.preprocess((x, x, y)))
    pytest.raises(GeneratorsError, lambda: Gens.preprocess((x, y, a)))
Beispiel #2
0
def test_Gens_preprocess():
    assert Gens.preprocess((None,)) == ()
    assert Gens.preprocess((x, y, z)) == (x, y, z)
    assert Gens.preprocess(((x, y, z),)) == (x, y, z)

    a = Symbol('a', commutative=False)

    pytest.raises(GeneratorsError, lambda: Gens.preprocess((x, x, y)))
    pytest.raises(GeneratorsError, lambda: Gens.preprocess((x, y, a)))
Beispiel #3
0
def test_Gens_postprocess():
    opt = {'gens': (x, y)}
    Gens.postprocess(opt)

    assert opt == {'gens': (x, y)}
Beispiel #4
0
def test_Gens_postprocess():
    opt = {'gens': (x, y)}
    Gens.postprocess(opt)

    assert opt == {'gens': (x, y)}