Package aterm :: Module _tests :: Class TestTerm
[frames] | no frames]

Class TestTerm




Nested Classes

Inherited from unittest.TestCase: failureException

Instance Methods
 
parseArgs(self, args)
 
parseKargs(self, kargs)
 
failIfMutable(self, obj)
 
testInt(self)
 
testReal(self)
 
testStr(self)
 
testList(self)
 
testAppl(self)
 
testIdentity(self)
 
testWrite(self)
 
testMatch(self)
 
testMake(self)
 
testHash(self)
 
testAnnotations(self)

Inherited from unittest.TestCase: __call__, __init__, __repr__, __str__, assertAlmostEqual, assertAlmostEquals, assertEqual, assertEquals, assertFalse, assertNotAlmostEqual, assertNotAlmostEquals, assertNotEqual, assertNotEquals, assertRaises, assertTrue, assert_, countTestCases, debug, defaultTestResult, fail, failIf, failIfAlmostEqual, failIfEqual, failUnless, failUnlessAlmostEqual, failUnlessEqual, failUnlessRaises, id, run, setUp, shortDescription, tearDown

Class Variables
  intTestCases = ['0', '1', '-2', '1234567890',]
  realTestCases = ['0.0', '1.2', '1.', '.1', '-1.2', '0.1E10', '...
  strTestCases = [(r'""', ''), (r'" "', ' '), (r'"\""', "\""), (...
  listTestCases = [('[]', 0), ('[1]', 1), ('[1,2]', 2), ('[[],[1...
  applTestCases = [('C', 'C', 0), ('C(1)', 'C', 1), ('C(1,2)', '...
  identityTestCases = [['1', '2'], ['0.1', '0.2'], ['""', '"s"',...
  matchTestCases = [('1', '_', True, ['1'], {}), ('1', 'x', True...
  makeTestCases = [('1', [], {}, '1'), ('0.1', [], {}, '0.1'), (...
Class Variable Details

realTestCases

Value:
['0.0', '1.2', '1.', '.1', '-1.2', '0.1E10', '0.1E-10', '0.1E+10', '1E\
10', '12345.67890',]

strTestCases

Value:
[(r'""', ''), (r'" "', ' '), (r'"\""', "\""), (r'"\t"', '\t'), (r'"\r"\
', '\r'), (r'"\n"', '\n'),]

listTestCases

Value:
[('[]', 0), ('[1]', 1), ('[1,2]', 2), ('[[],[1],[1,[2]]]', 3),]

applTestCases

Value:
[('C', 'C', 0), ('C(1)', 'C', 1), ('C(1,2)', 'C', 2),]

identityTestCases

Value:
[['1', '2'], ['0.1', '0.2'], ['""', '"s"', '"st"'], ['[]', '[1]', '[1,\
2]'], ['()', '(1)', '(1,2)'], ['C', 'D', 'C(1)', 'C(1,2)'],]

matchTestCases

Value:
[('1', '_', True, ['1'], {}), ('1', 'x', True, [], {'x': '1'}), ('0.1'\
, '_', True, ['0.1'], {}), ('0.1', 'x', True, [], {'x': '0.1'}), ('"s"\
', '_', True, ['"s"'], {}), ('"s"', 'x', True, [], {'x': '"s"'}), ('[]\
', '[*]', True, ['[]'], {}), ('[]', '[*x]', True, [], {'x': '[]'}), ('\
[1]', '[*]', True, ['[1]'], {}), ('[1]', '[*x]', True, [], {'x': '[1]'\
}), ('[1,2]', '[*]', True, ['[1,2]'], {}), ('[1,2]', '[*x]', True, [],\
 {'x': '[1,2]'}), ('[1,2]', '[1,*]', True, ['[2]'], {}), ('[1,2]', '[1\
,*x]', True, [], {'x': '[2]'}), ('[1,2]', '[1,2,*]', True, ['[]'], {})\
...

makeTestCases

Value:
[('1', [], {}, '1'), ('0.1', [], {}, '0.1'), ('"s"', [], {}, '"s"'), (\
'C', [], {}, 'C'), ('[1,2]', [], {}, '[1,2]'), ('C(1,2)', [], {}, 'C(1\
,2)'), ('_', ['1'], {}, '1'), ('_', ['0.1'], {}, '0.1'), ('_', ['"s"']\
, {}, '"s"'), ('_', ['C'], {}, 'C'), ('_', ['[1,2]'], {}, '[1,2]'), ('\
_', ['C(1,2)'], {}, 'C(1,2)'), ('x', [], {'x': '1'}, '1'), ('x', [], {\
'x': '0.1'}, '0.1'), ('x', [], {'x': '"s"'}, '"s"'), ('x', [], {'x': '\
C'}, 'C'), ('x', [], {'x': '[1,2]'}, '[1,2]'), ('x', [], {'x': 'C(1,2)\
'}, 'C(1,2)'), ('[_]', ['1'], {}, '[1]'), ('[_,_]', ['1', '2'], {}, '[\
...