Skip to content

Commit fdac95e

Browse files
bite 64
1 parent 2377091 commit fdac95e

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

64/event.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import itertools
2+
3+
names = 'Tim Bob Julian Carmen Sofia Mike Kim Andre'.split()
4+
locations = 'DE ES AUS NL BR US'.split()
5+
confirmed = [False, True, True, False, True]
6+
7+
8+
def get_attendees():
9+
for participant in itertools.zip_longest(names, locations, confirmed, fillvalue="-"):
10+
print(participant)
11+
12+
13+
if __name__ == '__main__':
14+
get_attendees()

64/test_event.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from event import get_attendees
2+
3+
4+
def test_get_attendees(capfd):
5+
get_attendees()
6+
output = capfd.readouterr()[0].strip().split("\n")
7+
8+
assert len(output) == 8
9+
assert "('Kim', '-', '-')" in output
10+
assert "('Andre', '-', '-')" in output

0 commit comments

Comments
 (0)