def test_wild():
    w = Symbol('w')
    s = Symbol('s')
    wargs = ([w], [True])
    assert (w.matches(Number(2), {}, wargs) == {w: 2})
    assert (w.matches(s, {}, wargs) == {w: s})
    assert (w.matches(w, {}, wargs) == None)
    assert (w.matches((s + 2), {}, wargs) == {w: (s + 2)})
    assert (w.matches((2 * s), {}, wargs) == {w: (2 * s)})
    assert (w.matches((s ** 2), {}, wargs) == {w: (s ** 2)})
def test_wild():
    w = Symbol('w')
    s = Symbol('s')
    wargs = ([w], [True])
    assert (w.matches(Number(2), {}, wargs) == {w: 2})
    assert (w.matches(s, {}, wargs) == {w: s})
    assert (w.matches(w, {}, wargs) == None)
    assert (w.matches((s + 2), {}, wargs) == {w: (s + 2)})
    assert (w.matches((2 * s), {}, wargs) == {w: (2 * s)})
    assert (w.matches((s ** 2), {}, wargs) == {w: (s ** 2)})