From fc544dc66078364c176451476fc17a3def2b3772 Mon Sep 17 00:00:00 2001 From: Srinivas Reddy Thatiparthy Date: Tue, 12 Dec 2017 00:10:49 +0530 Subject: [PATCH] remove redundant checking because * isinstance([], Sequence) is True * isinstance((), Sequence) is True --- _pytest/assertion/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pytest/assertion/util.py b/_pytest/assertion/util.py index 1d562686d..5a380ae09 100644 --- a/_pytest/assertion/util.py +++ b/_pytest/assertion/util.py @@ -109,7 +109,7 @@ def assertrepr_compare(config, op, left, right): summary = u('%s %s %s') % (ecu(left_repr), op, ecu(right_repr)) def issequence(x): - return (isinstance(x, (list, tuple, Sequence)) and not isinstance(x, basestring)) + return isinstance(x, Sequence) and not isinstance(x, basestring) def istext(x): return isinstance(x, basestring)