Esempio n. 1
0
 def test_nine_2(self):
     string_multiplier = "1"
     row1 = 1
     row2 = 2
     operation = "-"
     expected = "\\mathbf{r}_1 - \\mathbf{r}_2 \\to \\mathbf{r}_2"
     actual = rowop.create_op_string(string_multiplier, row1, row2,
                                     operation)
     self.failUnless(actual == expected)
Esempio n. 2
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)
Esempio n. 3
0
 def test_two(self):
     string_multiplier = ""
     row1 = 2
     row2 = 1
     operation = "+"
     expected = "\\mathbf{r}_2 + \\mathbf{r}_1 \\to \\mathbf{r}_1"
     actual = rowop.create_op_string(string_multiplier, row1, row2,
                                     operation)
     self.failUnless(actual == expected)
Esempio n. 4
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)