From 03bab95231ef2f12e273f91ce3538e382cf3e69b Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Thu, 23 May 2019 16:51:28 -0500 Subject: [PATCH] [stable-2.6] Validate types before asserting lengths (#56882) (cherry picked from commit 9c5b721) Co-authored-by: Matt Martz --- test/sanity/validate-modules/schema.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/sanity/validate-modules/schema.py b/test/sanity/validate-modules/schema.py index 06fde49a9f5..1e8e40413fc 100644 --- a/test/sanity/validate-modules/schema.py +++ b/test/sanity/validate-modules/schema.py @@ -25,13 +25,13 @@ def sequence_of_sequences(min=None, max=None): return All( Any( None, - [Length(min=min, max=max)], - tuple([Length(min=min, max=max)]), + [Any(list, tuple)], + tuple([Any(list, tuple)]), ), Any( None, - [Any(list, tuple)], - tuple([Any(list, tuple)]), + [Length(min=min, max=max)], + tuple([Length(min=min, max=max)]), ), )