def testIntegration(self):
     if skipTest(self.test): return skip('test disabled')
     output = surfaceRealize(self.data, self.meta)
     assertEqual(self, output, self.expected)
예제 #2
0
 def testContraint2(self):
     data = {'type': 'geq', 'lhs': ['a'], 'rhs': ['b', 'c']}
     output = constraint(data, {})
     expected = '$a$ is greater or equal than $b$ and $c$'
     assertEqual(self, output, expected)
예제 #3
0
 def testContraint3(self):
     data = {'symbol': 'b', 'type': 'inside', 'lb': 'a', 'ub': 'c'}
     output = constraint(data, {})
     expected = '$b$ is contained between $a$ and $c$'
     assertEqual(self, output, expected)
예제 #4
0
 def testWrapper(self):
     strings = ['a', 'b', 'c']
     output = wrapper('$%s$', strings)
     expected = ['$a$', '$b$', '$c$']
     assertEqual(self, output, expected)
예제 #5
0
 def testUnwrap(self):
     input = 'qwertyui\operator{QWERTY}opasdfghjk\operator{AZERTY}lzxcvbnm'
     expected = 'qwertyuiQWERTYopasdfghjkAZERTYlzxcvbnm'
     output = unwrap('\operator{%#%}', input)
     assertEqual(self, output, expected)
예제 #6
0
 def testAggregator4(self):
     strings = ['a', 'b', 'c', 'd']
     output = aggregator(strings)
     expected = 'a, b, c and d'
     assertEqual(self, output, expected)
예제 #7
0
 def testAggregator3(self):
     strings = ['a', 'b', 'c']
     output = aggregator(strings)
     expected = 'a, b and c'
     assertEqual(self, output, expected)
예제 #8
0
 def testAggregator2(self):
     strings = ['a', 'b']
     output = aggregator(strings)
     expected = 'a and b'
     assertEqual(self, output, expected)
예제 #9
0
 def testLogic(self):
     if skipTest(self.test): return skip('test disabled')
     output = surfaceLogic(self.data, self.meta)
     assertEqual(self, output, self.expected)
예제 #10
0
 def testStatement(self):
     if skipTest(self.test): return skip('test disabled')
     outputI = surfaceInputs(self.data, self.meta, 'input')
     outputS = surfaceInputs(self.data, self.meta, 'symbol')
     assertEqual(self, outputI, self.expected['surfaceInput'])
     assertEqual(self, outputS, self.expected['surfaceSymbol'])