Exemplo n.º 1
0
 def test_reserving_a_seat_twice(self):
     chart = SeatingChart(5, 5)
     chart.reserve((2, 8))
     expected = None
     actual = chart.reserve((2, 8))
     assert actual == expected
Exemplo n.º 2
0
 def test_reserved_seat_is_marked_reserved(self):
     chart = SeatingChart(5, 5)
     chart.reserve((1, 3))
     expected = True
     actual = chart.reserved((1, 3))
     assert actual == expected
Exemplo n.º 3
0
 def test_reserving_a_seat_once(self):
     chart = SeatingChart(5, 5)
     expected = [(2, 5)]
     actual = chart.reserve((2, 5))
     assert actual == expected
Exemplo n.º 4
0
 def test_reserve_takes_only_strs_or_ints(self):
     chart = SeatingChart(5, 5)
     with pytest.raises(ValueError):
         chart.reserve(4.5)