welcome to my submission for the garage door challenge. below you'll see how to turn the python version and C++ version
use 'A' to press the garage door button, and 'S' to trigger a safety hazard
CMAKE >= 3.5
ncurses
ubuntu 18.04 or higher
please ensure you have ncurses installed:
sudo apt-get install libncurses5-dev libncursesw5-dev
inside the C++
directory, please run
mkdir build && cd build && cmake .. && make
then to execute the program, please type
./main
to execute unit tests, please run
make test
Python 3
ubuntu 18.04 or higher
inside the python
directory, please run
python3 ./src/garage_door.py
to run unittests, please type
python3 -m unittest discover
Due to time constraints, I was unable to get a proper unit test that simulates keyboard inputs for the garage door. I would love to make a thorough unit test that types keyboard inputs on a separate thread. At least I am able to demonstrate my knowledge of creating unittests in CMake and Python.