Skip to content

Conversation

@elof-dev
Copy link
Owner

  • Updated purchasePlaces() to handle invalid inputs:
    • Added a check for empty input
    • Added a try/except block to catch non-numeric values
    • Added a condition to reject zero or negative values

  • Created test_invalid_number_of_places_booking.py:
    • Test 1: valid booking (success)
    • Test 2: zero places (error)
    • Test 3: negative places (error)
    • Test 4: empty input (error)
    • Test 5: non-numeric input (error)

- Updated purchasePlaces() to handle invalid inputs:
  • Added a check for empty input
  • Added a try/except block to catch non-numeric values
  • Added a condition to reject zero or negative values

- Created test_invalid_number_of_places_booking.py:
  • Test 1: valid booking (success)
  • Test 2: zero places (error)
  • Test 3: negative places (error)
  • Test 4: empty input (error)
  • Test 5: non-numeric input (error)
@elof-dev elof-dev merged commit 48abe0b into master Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant