示例#1
0
 def test_add_symbol(self):
     model = Model()
     model.add_symbol('x')
     model.add_symbol('why', string='y')
     eq_(len(model.symbols), 2)
     eq_(model.symbols['x'].name, 'x')
     eq_(model.symbols['why'].name, 'y')
示例#2
0
 def test_symbol(self):
     model = Model()
     model.add_symbol('x')
     eq_(model.symbol('x'), model.symbols['x'])