def test_pretty_format_tree1(): exp = ('Question(\n' " question='wakka?',\n" ' responses={\n' " 'jawaka': Pass()\n" ' }\n' ')') obs = PrettyFormatter(TREE1).visit() yield assert_equal, exp, obs yield assert_equal, exp, str(TREE1) yield assert_equal, exp.replace('\n', ''), repr(TREE1)
def test_pretty_format_tree1(): exp = ("Question(\n" " question='wakka?',\n" " responses={\n" " 'jawaka': Pass()\n" " }\n" ")") obs = PrettyFormatter(TREE1).visit() assert exp == obs assert exp == str(TREE1) assert exp.replace("\n", "") == repr(TREE1)
def test_pretty_format_tree1(): exp = ('Question(\n' " question='wakka?',\n" ' responses={\n' " 'jawaka': Pass()\n" ' }\n' ')') obs = PrettyFormatter(TREE1).visit() assert exp == obs assert exp == str(TREE1) assert exp.replace('\n', '') == repr(TREE1)
def test_pretty_format_tree0(): exp = ('Wizard(children=[\n' ' Pass(),\n' " Message('yo')\n" '])') obs = PrettyFormatter(TREE0).visit() yield assert_equal, exp, obs yield assert_equal, exp, str(TREE0) yield assert_equal, exp.replace('\n', ''), repr(TREE0)
def test_pretty_format_tree0(): exp = "Wizard(children=[\n" " Pass(),\n" " Message('yo')\n" "])" obs = PrettyFormatter(TREE0).visit() assert exp == obs assert exp == str(TREE0) assert exp.replace("\n", "") == repr(TREE0)
def test_pretty_format_tree0(): exp = ('Wizard(children=[\n' ' Pass(),\n' " Message('yo')\n" '])') obs = PrettyFormatter(TREE0).visit() assert exp == obs assert exp == str(TREE0) assert exp.replace('\n', '') == repr(TREE0)