- install pytest with the following command:
pip install -U pytest
- Check that you installed the correct version
$ pytest --version
pytest 6.2.4
- Run the following command to run all tests
pytest
- The date for the booking comes from somewhere else, e.g. user input
- A booking can only be made for the entire day
I wanted to tackle this in a Object Oriented Programming paradigm as I have more experience with Functional Programming in JavaScript but I thought the task requirements made more sense in an OOP structure.
Customer:
Acts as a record for each Customer making a booking
Booking:
Stores the necessary information for an individual booking for a specific customer on a specific day at a specific carpark
Carpark:
Stores and manages the necessary data to calculate how many parking bays are available on a given day
BookingManager:
Brings all the components together. Handles the creation of bookings, can retrieve bookings from a given date, etc
I don't believe I made any!