Skip to content

This project is my take on the Gilded Rose refactoring kata by Emily Bache. You can find a detailed overview of this project in a two part guide on my blog.

License

Notifications You must be signed in to change notification settings

ransaked1/GildedRosePython

Repository files navigation

GildedRosePython

This project is my take on the Gilded Rose refactoring kata by Emily Bache. You can find a detailed overview of this project in a two part guide on my blog. I did it in Python in the least amount of time and detail possible by writing the tests and refactoring only the code order/some logic.

These files contain the intermidiate steps in the refactoring process in the following order:
gilded_rose_extracted.py
gilded_rose_ifs_extracted_unified.py
gilded_rose_ifs_combined.py

Getting Started

Clone the repository and install the prerequisites.

Prerequisites

Make sure you have python installed:

sudo apt-get install python3

Install pytest:

pip3 install pytest

Install coverage:

pip3 install coverage

Usage

Running the program tests

Run the program:

python3 test_gilded_rose.py

Running the program with output for 2 days

python3 texttest_fixture.py

Test the coverage

Run the program:

python3 test_gilded_rose.py

Change every “self.assertEquals” to “self.assertEqual” in test_gilded_rose.py and run coverage:

coverage run -m pytest test_gilded_rose.py gilded_rose.py

Check the coverage report:

coverage report -m --include=gilded_rose.py

Built With

About

This project is my take on the Gilded Rose refactoring kata by Emily Bache. You can find a detailed overview of this project in a two part guide on my blog.

Topics

Resources

License

Stars

Watchers

Forks

Languages