seatgeek / businesstime

A simple python utility for calculating business time aware timedeltas between two datetimes
BSD 2-Clause "Simplified" License
85 stars 36 forks source link

fix AttributeError when no holidays are specified #10

Closed danc86 closed 8 years ago

danc86 commented 8 years ago

Fixes:

ERROR: test_no_holidays (businesstime.test.BusinessTimeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "businesstime/businesstime/test/__init__.py", line 110, in test_no_holidays
    self.assertFalse(bt.isholiday(date(2014, 1, 1)))
  File "businesstime/businesstime/__init__.py", line 49, in isholiday
    return dt in self._holidays
AttributeError: 'BusinessTime' object has no attribute '_holidays'
zackkitzmiller commented 8 years ago

This looks good to me. @erwaller, thoughts?

erwaller commented 8 years ago

Yup, thanks!