def test_contrast1(self):
    term = (self.terms[0] + self.terms[2])
    c = contrast.Contrast(term, self.formula)
    col1 = self.formula.termcolumns(self.terms[0], dict=False)
    col2 = self.formula.termcolumns(self.terms[1], dict=False)
    test = [([1] + ([0] * 9)), ((([0] * 2) + [1]) + ([0] * 7))]
    assert_almost_equal(c.matrix, test)
def test_contrast1(self):
    term = (self.terms[0] + self.terms[2])
    c = contrast.Contrast(term, self.formula)
    col1 = self.formula.termcolumns(self.terms[0], dict=False)
    col2 = self.formula.termcolumns(self.terms[1], dict=False)
    test = [([1] + ([0] * 9)), ((([0] * 2) + [1]) + ([0] * 7))]
    assert_almost_equal(c.matrix, test)