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

Class TestPath




Nested Classes

Inherited from unittest.TestCase: failureException

Instance Methods
 
testCompare(self)
 
testAncestor(self)
 
testProject(self)
 
testTransform(self)
 
testAnnotate(self)
 
testDeAnnotate(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
  testCompareTestCases = [([1, 2], [], path.ANCESTOR), ([1, 2], ...
  testAncestorTestCases = [([1, 2], [], []), ([1, 2], [0], []), ...
  projectTestCases = [('1', '/', '1'), ('[1,2]', '/', '[1,2]'), ...
  transformTestCases = [('1', '/', 'X(1)'), ('[1,2]', '/', 'X([1...
  annotateTestCases = [('A', 'A{Path([])}'), ('[A,B]', '[A{Path(...
Class Variable Details

testCompareTestCases

Value:
[([1, 2], [], path.ANCESTOR), ([1, 2], [0], path.PRECEDENT), ([1, 2], \
[1], path.ANCESTOR), ([1, 2], [1, 1], path.PRECEDENT), ([1, 2], [1, 2]\
, path.EQUAL), ([1, 2], [1, 2, 0], path.DESCENDENT), ([1, 2], [1, 3], \
path.SUBSEQUENT), ([1, 2], [2], path.SUBSEQUENT),]

testAncestorTestCases

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

projectTestCases

Value:
[('1', '/', '1'), ('[1,2]', '/', '[1,2]'), ('[1,2]', '/0/', '1'), ('[1\
,2]', '/1/', '2'), ('C(1,2)', '/', 'C(1,2)'), ('C(1,2)', '/0/', '1'), \
('C(1,2)', '/1/', '2'), ('A([B,C],[D,E])', '/0/0/', 'B'), ('A([B,C],[D\
,E])', '/0/1/', 'C'), ('A([B,C],[D,E])', '/1/0/', 'D'), ('A([B,C],[D,E\
])', '/1/1/', 'E'),]

transformTestCases

Value:
[('1', '/', 'X(1)'), ('[1,2]', '/', 'X([1,2])'), ('[1,2]', '/0/', '[X(\
1),2]'), ('[1,2]', '/1/', '[1,X(2)]'), ('C(1,2)', '/', 'X(C(1,2))'), (\
'C(1,2)', '/0/', 'C(X(1),2)'), ('C(1,2)', '/1/', 'C(1,X(2))'), ('A([B,\
C],[D,E])', '/0/1/', 'A([B,X(C)],[D,E])'), ('A([B,C],[D,E])', '/1/0/',\
 'A([B,C],[X(D),E])'),]

annotateTestCases

Value:
[('A', 'A{Path([])}'), ('[A,B]', '[A{Path([0])},B{Path([1])}]'), ('C(A\
,B)', 'C(A{Path([0])},B{Path([1])}){Path([])}'), ('[[C]]', '[[C{Path([\
0,0])}]]'), ('C(C(C))', 'C(C(C{Path([0,0])}){Path([0])}){Path([])}'), \
('[[A],[B]]', '[[A{Path([0,0])}],[B{Path([0,1])}]]'), ('C(C(A),C(B))',\
 'C(C(A{Path([0,0])}){Path([0])},C(B{Path([0,1])}){Path([1])}){Path([]\
)}'),]