def test_ordinal_factor(self):
    f = (['a', 'b', 'c'] * 3)
    fac = formula.Factor('ff', ['a', 'b', 'c'], ordinal=True)
    fac.namespace = {'ff': f}
    assert_equal(fac(), ([0, 1, 2] * 3))
    assert_equal(fac['a'], ([1, 0, 0] * 3))
    assert_equal(fac['b'], ([0, 1, 0] * 3))
    assert_equal(fac['c'], ([0, 0, 1] * 3))
def test_ordinal_factor(self):
    f = (['a', 'b', 'c'] * 3)
    fac = formula.Factor('ff', ['a', 'b', 'c'], ordinal=True)
    fac.namespace = {'ff': f}
    assert_equal(fac(), ([0, 1, 2] * 3))
    assert_equal(fac['a'], ([1, 0, 0] * 3))
    assert_equal(fac['b'], ([0, 1, 0] * 3))
    assert_equal(fac['c'], ([0, 0, 1] * 3))