A Battlesnake Written in Python
This is Steven Barre's Battlesnake bot based on the upstream Python Starter Snake.
I'm running in RHEL 8 and using the Python 3.8 AppStream
sudo yum module install python38/build
python3.8 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements-dev.txt
There's two requirement files. One for production use (ie: building a container to run the server) and one for development that include PyTest and helpers.
Use PyTest to test the snake server. Since the server is built on CherryPy, there's some helpful testing modules specifically for it.
- PyTest-Cov Code Coverage module for PyTest
- CherryPy Tutorial - Using pytest and code coverage
- CherryPy Advanced - Testing your application
- cherrypy.test package Check the source code of the various
cherrypy.test.test_*
modules for examples.
python -m pytest --cov=server --cov-report term-missing