Files
GildedRose-Refactoring-Kata/python
uzairarslan 3809be0b03 Add unit tests for the existing rules
One test per rule from the requirements, replacing test_foo. Tier
boundaries are checked on both sides, e.g. backstage passes at 11 and 10,
so an off-by-one can't slip through. All pass against the original code
with 100% branch coverage.
2026-09-24 03:21:18 +05:00
..
2015-06-27 08:08:50 +01:00
2025-07-17 15:44:35 +02:00

Gilded Rose starting position in Python

For exercise instructions see top level README

Suggestion: create a python virtual environment for this project. See the documentation

Run the unit tests from the Command-Line

python -m unittest

Run the TextTest fixture from the Command-Line

For e.g. 10 days:

python texttest_fixture.py 10

You should make sure the command shown above works when you execute it in a terminal before trying to use TextTest (see below).

Run the TextTest approval test that comes with this project

There are instructions in the TextTest Readme for setting up TextTest. You will need to specify the Python executable and interpreter in config.gr. Uncomment these lines:

executable:${TEXTTEST_HOME}/python/texttest_fixture.py
interpreter:python

Run the ApprovalTests.Python test

This test uses the framework ApprovalTests.Python. You will need to install Run it like this:

python tests/test_gilded_rose_approvals.py

You will need to approve the output file which appears under "approved_files" by renaming it from xxx.received.txt to xxx.approved.txt.