AnthonyCxx / comfort-airlines

High Point University 2024 Senior Software Engineering Project
2 stars 0 forks source link

Write `flight.py` module #32

Closed Dhud6 closed 5 months ago

Dhud6 commented 5 months ago

Write the models/flight.py module. The module should contain a Flight class. Unlike the Route class from the route module, which represents a generic route that can be flown, the Flight class represents a flight that is flown by an aircraft. Check for all constraints in the constructor. If a bad type is given, raise a TypeError; if a bad value is given (e.g. a negative flight number), raise a ValueError. All tests should test for both legal and illegal values (to verify that the class works as intended and catches errors). If you find yourself repeating code across unit tests, consider abstracting the repeated code into a pytest fixture.

with the following data members:

you should test:

Dhud6 commented 5 months ago

Initial update to flight.py. I added the basic setup for the class. This will probably need to be updated in the future once the other modules are created. Still need to create the pytest for this module.

Dhud6 commented 5 months ago

Updated flight.py. Started creating the pytest file for it.