def test_prefer_near_the_front(self):
     finder = SeatFinder(available_seats={'A6', 'B6', 'C7'})
     seats = finder.find_seats(1)
     assert seats == {'A6'}
 def test_finds_separate_seats_when_adjacent_not_available(self):
     finder = SeatFinder(available_seats={'A6', 'B6', 'C7'})
     seats = finder.find_seats(2)
     assert seats == {'B6', 'A6'}
 def test_find_seats_fails_when_not_enough_available(self):
     finder = SeatFinder(available_seats={'A6', 'B6', 'C7'})
     seats = finder.find_seats(5)
     assert seats == {}
 def test_find_seat_for_wheelchair_users(
         self):  # add new test - grow the spectrum of testing
     finder = SeatFinder(available_seats={'A1W', 'A6', 'B6', 'C7'})
     seats = finder.find_seat(1, wheelchair_count=1)
     assert seats == {'A1W'}
 def test_finds_adjacent_seats_when_more_than_one_requested(self):
     finder = SeatFinder(available_seats={'A6', 'A8', 'C6', 'C7'})
     seats = finder.find_seats(2)
     assert seats == {'C6', 'C7'}
示例#6
0
 def test_find_seats_fails_when_not_enough_available(self):
     finder = SeatFinder(available_seats={"A6", "B6", "C7"})
     seats = finder.find_seats(5)
     assert seats == {}
示例#7
0
 def test_prefer_near_the_front(self):
     finder = SeatFinder(available_seats={"A6", "B6", "C7"})
     seats = finder.find_seats(1)
     assert seats == {"A6"}
示例#8
0
 def test_finds_adjacent_seats_when_more_than_one_requested(self):
     finder = SeatFinder(available_seats={"A6", "A8", "C6", "C7"})
     seats = finder.find_seats(2)
     assert seats == {"C6", "C7"}
示例#9
0
 def test_finds_separate_seats_when_adjacent_not_available(self):
     finder = SeatFinder(available_seats={"A6", "B6", "C7"})
     seats = finder.find_seats(2)
     assert seats == {"B6", "A6"}
 def test_find_seats_fails_when_not_enough_available(self):
     finder = SeatFinder(available_seats={"A6", "B6", "C7"})
     seats = finder.find_seats(5)
     assert seats == {}
 def test_prefer_near_the_front(self):
     finder = SeatFinder(available_seats={"A6", "B6", "C7"})
     seats = finder.find_seats(1)
     assert seats == {"A6"}
 def test_finds_separate_seats_when_adjacent_not_available(self):
     finder = SeatFinder(available_seats={"A6", "B6", "C7"})
     seats = finder.find_seats(2)
     assert seats == {"B6", "A6"}
 def test_finds_adjacent_seats_when_more_than_one_requested(self):
     finder = SeatFinder(available_seats={"A6", "A8", "C6", "C7"})
     seats = finder.find_seats(2)
     assert seats == {"C6", "C7"}
示例#14
0
 def test_find_seats_for_wheelchair_users_on_front_row(self):
     finder = SeatFinder(available_seats={"A1W", "A6", "A7", "C7"})
     seats = finder.find_seats(1, wheelchair_count=1)
     assert seats == {"A1W"}
示例#15
0
 def test_find_seats_for_wheelchair_users_on_front_row(self):
     finder = SeatFinder(available_seats={"A1W", "A6", "A7", "C7"})
     seats = finder.find_seats(1, wheelchair_count=1)
     assert seats == {"A1W"}
示例#16
0
 def test_find_seats_for_wheelchair_users_on_front_row(self):
     finder = SeatFinder(available_seats={'A1W', 'A6', 'C7'})
     seats = finder.find_seats(1, wheelchair_count=1)
     assert seats == {'A1W'}