Blob Blame History Raw
From 20fcde23dc643fcb52d537a441b9a9328e61e551 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 5 Jul 2018 12:43:28 +0200
Subject: [PATCH] test: adjust test for JoinedStr

With astroid 2.0 we get a Str. Make the test accept both possibilities
in test_adjacent_joined_strings().
---
 tests/test_mark_tokens.py | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/tests/test_mark_tokens.py b/tests/test_mark_tokens.py
index 5347768dde..b433670b7b 100644
--- a/tests/test_mark_tokens.py
+++ b/tests/test_mark_tokens.py
@@ -244,12 +244,14 @@ bar = ('x y z'   # comment2
       )
 """
         m = self.create_mark_checker(source)
-        self.assertEqual(m.view_nodes_at(2, 6), {
-            "JoinedStr:f'x y z' \\\nf'''a b c''' f\"u v w\""
-        })
-        self.assertEqual(m.view_nodes_at(4, 7), {
-            "JoinedStr:'x y z'   # comment2\n       'a b c'   # comment3\n       f'u v w'"
-        })
+        self.assertIn(m.view_nodes_at(2, 6), [
+            {"Str:f'x y z' \\\nf'''a b c''' f\"u v w\""},
+            {"JoinedStr:f'x y z' \\\nf'''a b c''' f\"u v w\""},
+        ])
+        self.assertIn(m.view_nodes_at(4, 7), [
+            {"Str:'x y z'   # comment2\n       'a b c'   # comment3\n       f'u v w'"},
+            {"JoinedStr:'x y z'   # comment2\n       'a b c'   # comment3\n       f'u v w'"},
+        ])
 
 
   def test_splat(self):