Skip to content

Commit

Permalink
[new] Test for inc
Browse files Browse the repository at this point in the history
  • Loading branch information
Astalaseven committed Jan 3, 2014
1 parent 54967a0 commit 17af373
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,25 @@ def test_add_(self):

self.assertEqual(1, len(l2))

def test_inc_empty(self):

l = EventList()
l = l[::'inc']

self.assertEqual([], l)

def test_inc(self):

l = EventList()
t = arrow.now()

e0 = Event(begin=t.replace(hours=-1), end=t.replace(hours=+1))
e1 = Event(begin=t.replace(minutes=-30), end=t.replace(minutes=+30))
l.append(e0)
l = l[e1.begin:e1.end:'inc']

self.assertEqual([e0], l)


class TestCalendar(unittest.TestCase):

Expand Down

0 comments on commit 17af373

Please sign in to comment.