|
1 | 1 | # These tests are auto-generated with test data from:
|
2 | 2 | # https://github.com/exercism/problem-specifications/tree/main/exercises/ledger/canonical-data.json
|
3 |
| -# File last updated on 2023-07-19 |
| 3 | +# File last updated on 2023-12-27 |
4 | 4 |
|
5 | 5 | import unittest
|
6 | 6 |
|
@@ -54,22 +54,6 @@ def test_credit_and_debit(self):
|
54 | 54 | )
|
55 | 55 | self.assertEqual(format_entries(currency, locale, entries), expected)
|
56 | 56 |
|
57 |
| - def test_multiple_entries_on_same_date_ordered_by_description(self): |
58 |
| - currency = "USD" |
59 |
| - locale = "en_US" |
60 |
| - entries = [ |
61 |
| - create_entry("2015-01-02", "Get present", 1000), |
62 |
| - create_entry("2015-01-01", "Buy present", -1000), |
63 |
| - ] |
64 |
| - expected = "\n".join( |
65 |
| - [ |
66 |
| - "Date | Description | Change ", |
67 |
| - "01/01/2015 | Buy present | ($10.00)", |
68 |
| - "01/02/2015 | Get present | $10.00 ", |
69 |
| - ] |
70 |
| - ) |
71 |
| - self.assertEqual(format_entries(currency, locale, entries), expected) |
72 |
| - |
73 | 57 | def test_final_order_tie_breaker_is_change(self):
|
74 | 58 | currency = "USD"
|
75 | 59 | locale = "en_US"
|
@@ -171,3 +155,19 @@ def test_american_negative_number_with_3_digits_before_decimal_point(self):
|
171 | 155 | ]
|
172 | 156 | )
|
173 | 157 | self.assertEqual(format_entries(currency, locale, entries), expected)
|
| 158 | + |
| 159 | + def test_multiple_entries_on_same_date_ordered_by_description(self): |
| 160 | + currency = "USD" |
| 161 | + locale = "en_US" |
| 162 | + entries = [ |
| 163 | + create_entry("2015-01-01", "Get present", 1000), |
| 164 | + create_entry("2015-01-01", "Buy present", -1000), |
| 165 | + ] |
| 166 | + expected = "\n".join( |
| 167 | + [ |
| 168 | + "Date | Description | Change ", |
| 169 | + "01/01/2015 | Buy present | ($10.00)", |
| 170 | + "01/01/2015 | Get present | $10.00 ", |
| 171 | + ] |
| 172 | + ) |
| 173 | + self.assertEqual(format_entries(currency, locale, entries), expected) |
0 commit comments