Exemple #1
0
 def test_GetVariables(self):
     mod = Model()
     can = Country(mod, 'Eh', 'Canada')
     # Need to block the automatic creation of F, INC
     can_hh = Sector(can, 'HH', 'Household', has_F=False)
     can_hh.AddVariable('y', 'Vertical axis', '2.0')
     can_hh.AddVariable('x', 'Horizontal axis', 'y - t')
     self.assertEqual(can_hh.GetVariables(), ['x', 'y'])
Exemple #2
0
 def test_HasNoF(self):
     mod = Model()
     country = Country(mod, 'code', 'name')
     sec = Sector(country, 'Code', 'Name', has_F=False)
     self.assertNotIn('F', sec.GetVariables())