def _test_wild_symbol_factor():
    w = Symbol('w')
    s = Symbol('s')
    t = Symbol('t')
    p = (s * w)
    wargs = ({}, ([w], [True]))
    assert (p.matches(Number(1), *wargs) == {w: (1 / s)})
    assert (p.matches(s, *wargs) == {w: 1})
    assert (p.matches((2 + t), *wargs) == {w: ((2 + t) / s)})
def _test_wild_symbol_factor():
    w = Symbol('w')
    s = Symbol('s')
    t = Symbol('t')
    p = (s * w)
    wargs = ({}, ([w], [True]))
    assert (p.matches(Number(1), *wargs) == {w: (1 / s)})
    assert (p.matches(s, *wargs) == {w: 1})
    assert (p.matches((2 + t), *wargs) == {w: ((2 + t) / s)})