()
| 205 | |
| 206 | |
| 207 | def test_pretty_namedtuple() -> None: |
| 208 | console = Console(color_system=None) |
| 209 | console.begin_capture() |
| 210 | |
| 211 | example_namedtuple = StockKeepingUnit( |
| 212 | "Sparkling British Spring Water", |
| 213 | "Carbonated spring water", |
| 214 | 0.9, |
| 215 | "water", |
| 216 | ["its amazing!", "its terrible!"], |
| 217 | ) |
| 218 | |
| 219 | result = pretty_repr(example_namedtuple) |
| 220 | |
| 221 | print(result) |
| 222 | assert ( |
| 223 | result |
| 224 | == """StockKeepingUnit( |
| 225 | name='Sparkling British Spring Water', |
| 226 | description='Carbonated spring water', |
| 227 | price=0.9, |
| 228 | category='water', |
| 229 | reviews=['its amazing!', 'its terrible!'] |
| 230 | )""" |
| 231 | ) |
| 232 | |
| 233 | |
| 234 | def test_pretty_namedtuple_length_one_no_trailing_comma() -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…