(self, arr, repr, rows)
| 351 | width = 80 |
| 352 | |
| 353 | def check(self, arr, repr, rows): |
| 354 | count = 0 |
| 355 | width = None |
| 356 | header = None |
| 357 | for line in repr.split("\n"): |
| 358 | if not len(line): |
| 359 | break |
| 360 | if width is None: |
| 361 | width = len(line) |
| 362 | assert width <= self.width |
| 363 | header = line.split() |
| 364 | else: |
| 365 | assert width == len(line) |
| 366 | count += 1 |
| 367 | |
| 368 | if rows is not None: |
| 369 | assert count == rows + 1 # account for header |
| 370 | |
| 371 | names = arr.component_names |
| 372 | if "..." not in header: |
| 373 | assert len(header) == len(names) |
| 374 | else: |
| 375 | assert len(header) > 1 |
| 376 | header = {key for key in header if key != "..."} |
| 377 | assert not header.difference(names) |
| 378 | |
| 379 | def test_short(self): |
| 380 | arr = ct.SolutionArray(self.gas, 5) |
no test coverage detected