(self)
| 761 | self.assertTrue(ast.compare(a1, a2)) |
| 762 | |
| 763 | def test_compare_modes(self): |
| 764 | for mode, sources in ( |
| 765 | ("exec", exec_tests), |
| 766 | ("eval", eval_tests), |
| 767 | ("single", single_tests), |
| 768 | ): |
| 769 | for source in sources: |
| 770 | a = ast.parse(source, mode=mode) |
| 771 | b = ast.parse(source, mode=mode) |
| 772 | self.assertTrue( |
| 773 | ast.compare(a, b), f"{ast.dump(a)} != {ast.dump(b)}" |
| 774 | ) |
| 775 | |
| 776 | def test_compare_attributes_option(self): |
| 777 | def parse(a, b): |
nothing calls this directly
no test coverage detected