Blame 0004-test-split-calls-to-to_source-into-seperate-lines.patch

6fa890d
From 4ad635e3e82b0eafac20af2de7125650796c346f Mon Sep 17 00:00:00 2001
6fa890d
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
6fa890d
Date: Thu, 5 Jul 2018 12:41:40 +0200
6fa890d
Subject: [PATCH] test: split calls to to_source() into seperate lines
6fa890d
6fa890d
This makes it easier to see in the traceback if it the original node
6fa890d
or rebuilt_node caused a failure.
6fa890d
---
6fa890d
 tests/tools.py | 4 +++-
6fa890d
 1 file changed, 3 insertions(+), 1 deletion(-)
6fa890d
6fa890d
diff --git a/tests/tools.py b/tests/tools.py
6fa890d
index b8db8fa9ae..7814c66175 100644
6fa890d
--- a/tests/tools.py
6fa890d
+++ b/tests/tools.py
6fa890d
@@ -125,7 +125,9 @@ class MarkChecker(object):
6fa890d
       rebuilt_node = parse_snippet(text, is_expr=util.is_expr(node), is_module=util.is_module(node))
6fa890d
 
6fa890d
       # Now we need to check if the two nodes are equivalent.
6fa890d
-      test_case.assertEqual(to_source(rebuilt_node), to_source(node))
6fa890d
+      left = to_source(rebuilt_node)
6fa890d
+      right = to_source(node)
6fa890d
+      test_case.assertEqual(left, right)
6fa890d
       tested_nodes += 1
6fa890d
 
6fa890d
     return tested_nodes