コード例 #1
0
ファイル: test_symbol.py プロジェクト: cbm755/diofant
def test_as_dummy():
    x = Symbol('x')
    x1 = x.as_dummy()
    assert x1 != x
    assert x1 != x.as_dummy()

    x = Symbol('x', commutative=False)
    x1 = x.as_dummy()
    assert x1 != x
    assert x1.is_commutative is False
コード例 #2
0
ファイル: test_repr.py プロジェクト: diofant/diofant
def test_Dummy_from_Symbol():
    # should not get the full dictionary of assumptions
    n = Symbol('n', integer=True)
    d = n.as_dummy()
    assert repr(d) == "Dummy('n', integer=True)"
コード例 #3
0
ファイル: test_repr.py プロジェクト: skirpichev/diofant
def test_Dummy_from_Symbol():
    # should not get the full dictionary of assumptions
    n = Symbol('n', integer=True)
    d = n.as_dummy()
    assert repr(d) == "Dummy('n', integer=True)"