def test_settings_null(self): set_eval_date() #if you run on the weekend, date will roll forward self.assertTrue( get_eval_date() >= date.today() )
def settlementDate(self): dt = getattr(self, "_settlement", None) if not dt: dt = Calendars.advance(get_eval_date(), self.settlementDays, TimeUnits.Days, self._calendar, BusinessDayConventions.Following) self._settlement = dt return dt
def test_settings_functional(self): dt = date(1960, 8, 9) set_eval_date(dt) self.assertEquals( dt, get_eval_date() )