(self)
| 666 | self.assertCountEqual(ast.expr.__doc__.split("\n"), expressions) |
| 667 | |
| 668 | def test_compare_basics(self): |
| 669 | self.assertTrue(ast.compare(ast.parse("x = 10"), ast.parse("x = 10"))) |
| 670 | self.assertFalse(ast.compare(ast.parse("x = 10"), ast.parse(""))) |
| 671 | self.assertFalse(ast.compare(ast.parse("x = 10"), ast.parse("x"))) |
| 672 | self.assertFalse( |
| 673 | ast.compare(ast.parse("x = 10;y = 20"), ast.parse("class C:pass")) |
| 674 | ) |
| 675 | |
| 676 | def test_compare_modified_ast(self): |
| 677 | # The ast API is a bit underspecified. The objects are mutable, |
nothing calls this directly
no test coverage detected