|
| 1 | +# These tests are auto-generated with test data from: |
| 2 | +# https://github.com/exercism/problem-specifications/tree/main/exercises/line-up/canonical-data.json |
| 3 | +# File last updated on 2026-01-23 |
| 4 | + |
| 5 | +import unittest |
| 6 | + |
| 7 | +from line_up import ( |
| 8 | + line_up, |
| 9 | +) |
| 10 | + |
| 11 | + |
| 12 | +class LineUpTest(unittest.TestCase): |
| 13 | + def test_format_smallest_non_exceptional_ordinal_numeral_4(self): |
| 14 | + self.assertEqual( |
| 15 | + line_up("Gianna", 4), |
| 16 | + "Gianna, you are the 4th customer we serve today. Thank you!", |
| 17 | + ) |
| 18 | + |
| 19 | + def test_format_greatest_single_digit_non_exceptional_ordinal_numeral_9(self): |
| 20 | + self.assertEqual( |
| 21 | + line_up("Maarten", 9), |
| 22 | + "Maarten, you are the 9th customer we serve today. Thank you!", |
| 23 | + ) |
| 24 | + |
| 25 | + def test_format_non_exceptional_ordinal_numeral_5(self): |
| 26 | + self.assertEqual( |
| 27 | + line_up("Petronila", 5), |
| 28 | + "Petronila, you are the 5th customer we serve today. Thank you!", |
| 29 | + ) |
| 30 | + |
| 31 | + def test_format_non_exceptional_ordinal_numeral_6(self): |
| 32 | + self.assertEqual( |
| 33 | + line_up("Attakullakulla", 6), |
| 34 | + "Attakullakulla, you are the 6th customer we serve today. Thank you!", |
| 35 | + ) |
| 36 | + |
| 37 | + def test_format_non_exceptional_ordinal_numeral_7(self): |
| 38 | + self.assertEqual( |
| 39 | + line_up("Kate", 7), |
| 40 | + "Kate, you are the 7th customer we serve today. Thank you!", |
| 41 | + ) |
| 42 | + |
| 43 | + def test_format_non_exceptional_ordinal_numeral_8(self): |
| 44 | + self.assertEqual( |
| 45 | + line_up("Maximiliano", 8), |
| 46 | + "Maximiliano, you are the 8th customer we serve today. Thank you!", |
| 47 | + ) |
| 48 | + |
| 49 | + def test_format_exceptional_ordinal_numeral_1(self): |
| 50 | + self.assertEqual( |
| 51 | + line_up("Mary", 1), |
| 52 | + "Mary, you are the 1st customer we serve today. Thank you!", |
| 53 | + ) |
| 54 | + |
| 55 | + def test_format_exceptional_ordinal_numeral_2(self): |
| 56 | + self.assertEqual( |
| 57 | + line_up("Haruto", 2), |
| 58 | + "Haruto, you are the 2nd customer we serve today. Thank you!", |
| 59 | + ) |
| 60 | + |
| 61 | + def test_format_exceptional_ordinal_numeral_3(self): |
| 62 | + self.assertEqual( |
| 63 | + line_up("Henriette", 3), |
| 64 | + "Henriette, you are the 3rd customer we serve today. Thank you!", |
| 65 | + ) |
| 66 | + |
| 67 | + def test_format_smallest_two_digit_non_exceptional_ordinal_numeral_10(self): |
| 68 | + self.assertEqual( |
| 69 | + line_up("Alvarez", 10), |
| 70 | + "Alvarez, you are the 10th customer we serve today. Thank you!", |
| 71 | + ) |
| 72 | + |
| 73 | + def test_format_non_exceptional_ordinal_numeral_11(self): |
| 74 | + self.assertEqual( |
| 75 | + line_up("Jacqueline", 11), |
| 76 | + "Jacqueline, you are the 11th customer we serve today. Thank you!", |
| 77 | + ) |
| 78 | + |
| 79 | + def test_format_non_exceptional_ordinal_numeral_12(self): |
| 80 | + self.assertEqual( |
| 81 | + line_up("Juan", 12), |
| 82 | + "Juan, you are the 12th customer we serve today. Thank you!", |
| 83 | + ) |
| 84 | + |
| 85 | + def test_format_non_exceptional_ordinal_numeral_13(self): |
| 86 | + self.assertEqual( |
| 87 | + line_up("Patricia", 13), |
| 88 | + "Patricia, you are the 13th customer we serve today. Thank you!", |
| 89 | + ) |
| 90 | + |
| 91 | + def test_format_exceptional_ordinal_numeral_21(self): |
| 92 | + self.assertEqual( |
| 93 | + line_up("Washi", 21), |
| 94 | + "Washi, you are the 21st customer we serve today. Thank you!", |
| 95 | + ) |
| 96 | + |
| 97 | + def test_format_exceptional_ordinal_numeral_62(self): |
| 98 | + self.assertEqual( |
| 99 | + line_up("Nayra", 62), |
| 100 | + "Nayra, you are the 62nd customer we serve today. Thank you!", |
| 101 | + ) |
| 102 | + |
| 103 | + def test_format_exceptional_ordinal_numeral_100(self): |
| 104 | + self.assertEqual( |
| 105 | + line_up("John", 100), |
| 106 | + "John, you are the 100th customer we serve today. Thank you!", |
| 107 | + ) |
| 108 | + |
| 109 | + def test_format_exceptional_ordinal_numeral_101(self): |
| 110 | + self.assertEqual( |
| 111 | + line_up("Zeinab", 101), |
| 112 | + "Zeinab, you are the 101st customer we serve today. Thank you!", |
| 113 | + ) |
| 114 | + |
| 115 | + def test_format_non_exceptional_ordinal_numeral_112(self): |
| 116 | + self.assertEqual( |
| 117 | + line_up("Knud", 112), |
| 118 | + "Knud, you are the 112th customer we serve today. Thank you!", |
| 119 | + ) |
| 120 | + |
| 121 | + def test_format_exceptional_ordinal_numeral_123(self): |
| 122 | + self.assertEqual( |
| 123 | + line_up("Yma", 123), |
| 124 | + "Yma, you are the 123rd customer we serve today. Thank you!", |
| 125 | + ) |
0 commit comments