BUG: Fixed a bug with offsets in week_start and week_end

This commit is contained in:
Joe Jevnik
2014-10-20 17:17:34 -04:00
parent 615228b272
commit 69124cb6ab
2 changed files with 51 additions and 12 deletions
+2 -2
View File
@@ -14,7 +14,7 @@
# limitations under the License.
import datetime
import random
from itertools import islice, dropwhile
from itertools import islice
from six.moves import range, map
from nose_parameterized import parameterized
from unittest import TestCase
@@ -281,7 +281,7 @@ class TestStatelessRules(RuleTestCase):
should_trigger = NthTradingDayOfWeek(n).should_trigger
prev_day = self.sept_week[0].date()
n_tdays = 0
for m in dropwhile(lambda n: not should_trigger(n), self.sept_week):
for m in self.sept_week:
if prev_day < m.date():
n_tdays += 1
prev_day = m.date()