server/test/unittest_session.py
branchtls-sprint
changeset 1802 d628defebc17
parent 1398 5fe84a5f7035
child 1977 606923dff11b
equal deleted inserted replaced
1801:672acc730ce5 1802:d628defebc17
     4 
     4 
     5 class Variable:
     5 class Variable:
     6     def __init__(self, name):
     6     def __init__(self, name):
     7         self.name = name
     7         self.name = name
     8         self.children = []
     8         self.children = []
     9         
     9 
    10     def get_type(self, solution, args=None):
    10     def get_type(self, solution, args=None):
    11         return solution[self.name]
    11         return solution[self.name]
    12     def as_string(self):
    12     def as_string(self):
    13         return self.name
    13         return self.name
    14     
    14 
    15 class Function:
    15 class Function:
    16     def __init__(self, name, varname):
    16     def __init__(self, name, varname):
    17         self.name = name
    17         self.name = name
    18         self.children = [Variable(varname)]
    18         self.children = [Variable(varname)]
    19     def get_type(self, solution, args=None):
    19     def get_type(self, solution, args=None):