(self)
| 370 | table.get_col("c") |
| 371 | |
| 372 | def test_sort(self): |
| 373 | table = utils.Table(headings=["a", "b"], rows=[[1, 4], [3, 2]]) |
| 374 | table.sort(key=lambda row: row[-1]) |
| 375 | self.assertEqual( |
| 376 | utils.Table(headings=["a", "b"], rows=[[3, 2], [1, 4]]), |
| 377 | table, |
| 378 | ) |
| 379 | table.sort(key=lambda row: row[-1], reverse=True) |
| 380 | self.assertEqual( |
| 381 | utils.Table(headings=["a", "b"], rows=[[1, 4], [3, 2]]), |
| 382 | table, |
| 383 | ) |
| 384 | |
| 385 | |
| 386 | class FlagConfigurableTest(parameterized.TestCase): |