Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 0 additions & 78 deletions src/supermarket_receipt/.gitignore

This file was deleted.

33 changes: 11 additions & 22 deletions src/supermarket_receipt/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
# Supermarket Receipt in [Python](https://www.python.org/)
# Supermarket Receipt

## Setup

* Have Python installed
* Clone the repository
* On the command line, enter the `SupermarketReceipt-Refactoring-Kata/python` directory
* On the command line, install requirements, e.g. on the`python -m pip install -r requirements.txt`

## Running Tests

On the command line, enter the `SupermarketReceipt-Refactoring-Kata/python` directory and run
You are working on the software for a supermarket, in particular for the teller machine that cashiers use to calculate the price of a shopping cart full of items and give the customer a receipt. The supermarket has a catalog of products for sale at various prices. Normally the price of a shopping cart is the sum of the prices of all the items in it. However, at any given time there might be special offers and price reductions on particular products. For example:

```
pytest
```
- 10% discount
- 3 for the price of 2
- 2 items for a reduced price
- 5 items for a reduced price

## Optional: Running [TextTest](https://www.texttest.org/) Tests
The starting position for this exercise contains the code for setting up the Teller object, a catalog of products, the shopping cart, and any special offers. It can calculate the price of a shopping cart and generate a receipt, but so far there aren't many test cases.

Install TextTest according to the [instructions](https://www.texttest.org/index.html#getting-started-with-texttest) (platform specific).

On the command line, enter the `SupermarketReceipt-Refactoring-Kata/python` directory and run

```
texttest -a sr -d .
```
## Setup
- make a venv
- install requirements, e.g. `python -m pip install -r requirements.txt`
- use pytest to run the tests
78 changes: 0 additions & 78 deletions src/supermarket_receipt/python/.gitignore

This file was deleted.

26 changes: 0 additions & 26 deletions src/supermarket_receipt/python/README.md

This file was deleted.

9 changes: 0 additions & 9 deletions src/supermarket_receipt/python/catalog.py

This file was deleted.

38 changes: 0 additions & 38 deletions src/supermarket_receipt/python/model_objects.py

This file was deleted.

4 changes: 0 additions & 4 deletions src/supermarket_receipt/python/requirements.txt

This file was deleted.

32 changes: 0 additions & 32 deletions src/supermarket_receipt/python/tests/test_supermarket.py

This file was deleted.

35 changes: 0 additions & 35 deletions src/supermarket_receipt/receipt.py

This file was deleted.

Loading