(self)
| 348 | ) |
| 349 | |
| 350 | def test_single_pair(self) -> None: |
| 351 | x0 = NameExpr("x0") |
| 352 | x1 = NameExpr("x1") |
| 353 | |
| 354 | single_comparison = [("==", x0, x1)] |
| 355 | expected_output = [("==", [0, 1])] |
| 356 | |
| 357 | assignable_combinations: list[dict[int, NameExpr]] = [{}, {0: x0}, {1: x1}, {0: x0, 1: x1}] |
| 358 | to_group_by: list[set[str]] = [set(), {"=="}, {"is"}] |
| 359 | |
| 360 | for combo in assignable_combinations: |
| 361 | for operators in to_group_by: |
| 362 | keymap = self.literal_keymap(combo) |
| 363 | self.assertEqual( |
| 364 | group_comparison_operands(single_comparison, keymap, operators), |
| 365 | expected_output, |
| 366 | ) |
| 367 | |
| 368 | def test_empty_pair_list(self) -> None: |
| 369 | # This case should never occur in practice -- ComparisonExprs |
nothing calls this directly
no test coverage detected