Test basic par calculation with a simple DD table.
(self)
| 11 | """Tests for par (par score calculation).""" |
| 12 | |
| 13 | def test_par_basic(self) -> None: |
| 14 | """Test basic par calculation with a simple DD table.""" |
| 15 | # First, create a DD table result |
| 16 | table_deal = { |
| 17 | "cards": [ |
| 18 | [0x7FFC, 0, 0, 0], |
| 19 | [0, 0x7FFC, 0, 0], |
| 20 | [0, 0, 0x7FFC, 0], |
| 21 | [0, 0, 0, 0x7FFC], |
| 22 | ], |
| 23 | } |
| 24 | |
| 25 | # Note: We can't easily test par without a valid DD table |
| 26 | # This test demonstrates the API but may not produce meaningful results |
| 27 | try: |
| 28 | dd_table = calc_dd_table(table_deal) |
| 29 | result = par(dd_table) |
| 30 | self.assertTrue(isinstance(result, dict)) |
| 31 | except RuntimeError: |
| 32 | # Invalid table is acceptable |
| 33 | raise SkipTest("Could not create valid DD table") |
| 34 | |
| 35 | def test_par_vulnerable_none(self) -> None: |
| 36 | """Test par with vulnerable=0 (neither vulnerable).""" |
nothing calls this directly
no test coverage detected