Skip to content

Commit

Permalink
Updated MockContext test_scroll test
Browse files Browse the repository at this point in the history
  • Loading branch information
ahsimb committed Oct 24, 2023
1 parent 2827721 commit 077dec3
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions tests/test_mock_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,13 @@ def context_set_emits(meta_set_emits):


def test_scroll(context_set_emits):
assert not context_set_emits.output_groups
assert context_set_emits.next_group()
assert context_set_emits.t2 == 'cat'
assert context_set_emits.next()
assert context_set_emits.t2 == 'dog'
assert not context_set_emits.next()
assert context_set_emits.next_group()
assert context_set_emits.t2 == 'ant'
assert context_set_emits.next()
assert context_set_emits.t2 == 'bee'
assert context_set_emits.next()
assert context_set_emits.t2 == 'beetle'
assert not context_set_emits.next()
assert not context_set_emits.next_group()
groups = []
while context_set_emits.next_group():
group = [context_set_emits.t2]
while context_set_emits.next():
group.append(context_set_emits.t2)
groups.append(group)
assert groups == [['cat', 'dog'], ['ant', 'bee', 'beetle']]


def test_output_groups(context_set_emits):
Expand Down

0 comments on commit 077dec3

Please sign in to comment.