MCPcopy Create free account
hub / github.com/python/cpython / test_compare_attributes_option

Method test_compare_attributes_option

Lib/test/test_ast/test_ast.py:776–783  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

774 )
775
776 def test_compare_attributes_option(self):
777 def parse(a, b):
778 return ast.parse(a), ast.parse(b)
779
780 a, b = parse("2 + 2", "2+2")
781 self.assertTrue(ast.compare(a, b))
782 self.assertTrue(ast.compare(a, b, compare_attributes=False))
783 self.assertFalse(ast.compare(a, b, compare_attributes=True))
784
785 def test_compare_attributes_option_missing_attribute(self):
786 # test that missing runtime attributes is handled in ast.compare()

Callers

nothing calls this directly

Calls 4

assertTrueMethod · 0.80
assertFalseMethod · 0.80
parseFunction · 0.50
compareMethod · 0.45

Tested by

no test coverage detected