Exemplo n.º 1
0
	def test_load_m(self):
		latex_results = [
			r'A=\left(\begin{matrix}1&2&3\\4&5&6\end{matrix}\right)\sum_{1}^{20}x'
		]
		i=0
		for omath in omml.load(PROJECT_ROOT+'/tests/m.xml'):
			self.assertEqual(omath.latex,latex_results[i])
			i=i+1
Exemplo n.º 2
0
	def test_load_group(self):
		latex_results = [
			r'A\overbrace{123}\underbrace{456}=\left\{a+b\right)'
		]
		i=0
		for omath in omml.load(PROJECT_ROOT+'/tests/group.xml'):
			self.assertEqual(omath.latex,latex_results[i])
			i=i+1
Exemplo n.º 3
0
	def test_load_lim(self):
		latex_results = [
			r'A=log_{x}y\max_{0≤x≤1}xe^{−x^{2}}\lim_{1\to \infty }a\overset{def}{=}x'
		]
		i=0
		for omath in omml.load(PROJECT_ROOT+'/tests/lim.xml'):
			self.assertEqual(omath.latex,latex_results[i])
			i=i+1
Exemplo n.º 4
0
	def test_load_ml(self):
		latex_results = [
		r'\sin(\sqrt[3]{x})^{x^{11}}/_{b}x_{m}^{n}',
		r'\tilde{a}\begin{array}{c}a=b+c\\d+e=f\end{array}\\\underline{cdef}']
		i = 0	
		for omath in omml.load(PROJECT_ROOT+'/tests/simple.xml'):
			self.assertEqual(omath.latex,latex_results[i])
			i=i+1
Exemplo n.º 5
0
 def test_load_m(self):
     latex_results = [
         r'A=\left(\begin{matrix}1&2&3\\4&5&6\end{matrix}\right)\sum_{1}^{20}x'
     ]
     i = 0
     for omath in omml.load(PROJECT_ROOT + '/tests/m.xml'):
         self.assertEqual(omath.latex, latex_results[i])
         i = i + 1
Exemplo n.º 6
0
 def test_load_lim(self):
     latex_results = [
         r'A=log_{x}y\max_{0≤x≤1}xe^{−x^{2}}\lim_{1\to \infty }a\overset{def}{=}x'
     ]
     i = 0
     for omath in omml.load(PROJECT_ROOT + '/tests/lim.xml'):
         self.assertEqual(omath.latex, latex_results[i])
         i = i + 1
Exemplo n.º 7
0
 def test_load_ml(self):
     latex_results = [
         r'\sin(\sqrt[3]{x})^{x^{11}}/_{b}x_{m}^{n}',
         r'\tilde{a}\begin{array}{c}a=b+c\\d+e=f\end{array}\\\underline{cdef}'
     ]
     i = 0
     for omath in omml.load(PROJECT_ROOT + '/tests/simple.xml'):
         self.assertEqual(omath.latex, latex_results[i])
         i = i + 1
Exemplo n.º 8
0
 def test_load_group(self):
     latex_results = [r'A\overbrace{123}\underbrace{456}=\left\{a+b\right)']
     i = 0
     for omath in omml.load(PROJECT_ROOT + '/tests/group.xml'):
         self.assertEqual(omath.latex, latex_results[i])
         i = i + 1