Example #1
0
 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()
         )
Example #2
0
    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
Example #3
0
 def test_settings_functional(self):
     
     dt = date(1960, 8, 9)
     
     set_eval_date(dt)
     
     self.assertEquals(
         dt,
         get_eval_date()
         )
Example #4
0
 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