This is a simple command line simulation of a vending machine.
To get started, you'll need to do the following:
- Clone the repository:
git clone https://github.com/justinpallas/vending_machine.git
- Next, navigate into the project directory:
cd vending_machine
- Create a virtual environment (optional but recommended):
python -m venv myenv
- Activate the virtual environment:
source myenv/bin/activate
(Linux/Mac) ormyenv\Scripts\activate
(Windows) - Install the required packages:
pip install -r requirements.txt
- Run the project:
python vending_machine.py
Here's how you can use the project:
- First, make sure the project is installed (see Installation section above).
- Open a terminal or command prompt.
- Activate the virtual environment (if you created one):
source myenv/bin/activate
(Linux/Mac) ormyenv\Scripts\activate
(Windows). - Run the project:
python vending_machine.py
. - Follow the on-screen instructions to use the project.
To run the tests, make sure you're in the project directory and that your virtual environment is activated.
Then, simply run the following command: pytest
This will run all the tests from the test_vending_machine.py file and display the results in the terminal
That's it! You should now be able to get the project up and running on your local machine.