Ejemplo n.º 1
0
 def test_four(self):
     string_multiplier = rowop.frac_to_latex(rowop.F(-1, 17))
     row1 = 1
     row2 = 2
     operation = "+"
     expected = "\\frac{-1}{17}\\mathbf{r}_1 + \\mathbf{r}_2 \\to \\mathbf{r}_2"
     actual = rowop.create_op_string(string_multiplier, row1, row2,
                                     operation)
     self.failUnless(actual == expected)
Ejemplo n.º 2
0
 def test_eight(self):
     string_multiplier = rowop.frac_to_latex(rowop.F(-1))
     row1 = 1
     # row2 is irrelevant here
     row2 = -1
     operation = "scale"
     expected = "-\\mathbf{r}_1 \\to \\mathbf{r}_1"
     actual = rowop.create_op_string(string_multiplier, row1, row2,
                                     operation)
     self.failUnless(actual == expected)
Ejemplo n.º 3
0
 def test_three(self):
     expected = "\\frac{-2}{3}"
     actual = rowop.frac_to_latex(rowop.F(-2, 3))
     self.failUnless(actual == expected)
Ejemplo n.º 4
0
 def test_two(self):
     expected = "1"
     actual = rowop.frac_to_latex(rowop.F(2, 2))
     self.failUnless(actual == expected)
Ejemplo n.º 5
0
 def test_four(self):
     expected = "-17"
     actual = rowop.frac_to_latex(rowop.F(-17, 1))
     self.failUnless(actual == expected)