Skip to content

My attempt to solve the Advent of code problems using TDD in Python

Notifications You must be signed in to change notification settings

jairo1024/advent-of-code

Repository files navigation

Advent of Code

Build Status codecov

Here are my solutions for the Advent of Code puzzles. The goal is to solve these problems using TDD in Python.

Requirements

  1. Python 3
  2. Virtual Environment

Setup

Spin up the virtual environment and activate it to install the required python packages.

virtualenv .venv
source .venv/bin/activate
pip install -r requirements.txt

#maybe required
chmod 755 run_linter.sh

Running Workflow

The repository is setup with pylint and black so the Travis CI will check that the repository is perfectly formatted and has no linting issues. I have created run_linter.sh to run the checks for pylint and black with one command.

Running linter

./run_linter.sh

#if you get any formatting failures run the following
black .

Running the tests

I have setup the repo for doing unit testing as well as integration testing.

The unit tests should prove out the functionality of feature by providing different small sample data, while the integration tests are expected to prove out the full solution of the feature by using the sample input data that is provided by the puzzle description.

Running the tests

#Unit tests only
pytest tests/unit/

#Integration tests only
pytest tests/integration/

#All tests
pytest

About

My attempt to solve the Advent of code problems using TDD in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published