def testIntegration(self): if skipTest(self.test): return skip('test disabled') output = surfaceRealize(self.data, self.meta) assertEqual(self, output, self.expected)
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)
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)
def testWrapper(self): strings = ['a', 'b', 'c'] output = wrapper('$%s$', strings) expected = ['$a$', '$b$', '$c$'] assertEqual(self, output, expected)
def testUnwrap(self): input = 'qwertyui\operator{QWERTY}opasdfghjk\operator{AZERTY}lzxcvbnm' expected = 'qwertyuiQWERTYopasdfghjkAZERTYlzxcvbnm' output = unwrap('\operator{%#%}', input) assertEqual(self, output, expected)
def testAggregator4(self): strings = ['a', 'b', 'c', 'd'] output = aggregator(strings) expected = 'a, b, c and d' assertEqual(self, output, expected)
def testAggregator3(self): strings = ['a', 'b', 'c'] output = aggregator(strings) expected = 'a, b and c' assertEqual(self, output, expected)
def testAggregator2(self): strings = ['a', 'b'] output = aggregator(strings) expected = 'a and b' assertEqual(self, output, expected)
def testLogic(self): if skipTest(self.test): return skip('test disabled') output = surfaceLogic(self.data, self.meta) assertEqual(self, output, self.expected)
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'])