/python-practice

Playground for fun little python programs. Also using to practice code / test coverage and unit testing.

Primary LanguagePythonMIT LicenseMIT

Python Sandbox for Practice

This side project was made to begin focusing on common functions in python while also experimenting with best practices for unit testing and code / test coverage. Also focusing more on moving away from python 2.7 and learning python3 features.

Getting Started

To get started, grab the https link above and clone this repo to your local machine

git clone https://github.com/benhurley/python-practice.git

Then run the test suite from inside the python-practice directory (-v verbose flag is optional)

python3 -m unittest discover -v

To see code coverage, run with compare (again, -v verbose flag and -m missing flags are optional)

coverage run -m unittest discover -v
coverage report -m

Prerequisites

In order to clone and run the project, you will need the following:

  1. Python 3 (Install with homebrew, or download directly from their website)
  2. Coverage (optional for code coverage).

Functions

Testing

Testing is currently being completed with unittest.

Acknowledgments

Corey Schafer - Python Tutorial: Unit Testing Your Code with the unittest Module

Shane Exterkamp - Python Data Structures