Пример #1
0
 def test_generatelist(self, formula, year, dates_list):
     formula_obj = BlasFormula(formula, year)
     try:
         formula_obj.generatelist()
         d_list = formula_obj.dates_list
     except FormulaException:
         d_list = False
     self.assertEquals(d_list, dates_list)
Пример #2
0
 def test_explain(self, formula, days, subformula):
     _days, _subformula = BlasFormula.explain(formula)
     self.assertEquals(days, _days)
     self.assertEquals(subformula, _subformula)
Пример #3
0
 def test_is_formula(self, formula, result):
     message = "формула {0} должна быть {1}".format(formula, "корректной" if result else "не корректной")
     self.assertEquals(BlasFormula.is_formula(formula), result, message)