From aa0de4a0c892dcc2dc40ef051c343732b09a954d Mon Sep 17 00:00:00 2001 From: Vasily Nemkov Date: Tue, 22 Oct 2019 10:45:00 +0300 Subject: [PATCH] Minor non-functional test fixes. --- .../0_stateless/00921_datetime64_compatibility.python | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dbms/tests/queries/0_stateless/00921_datetime64_compatibility.python b/dbms/tests/queries/0_stateless/00921_datetime64_compatibility.python index b793c7ff293..14ab8b35da5 100755 --- a/dbms/tests/queries/0_stateless/00921_datetime64_compatibility.python +++ b/dbms/tests/queries/0_stateless/00921_datetime64_compatibility.python @@ -79,10 +79,6 @@ CAST({datetime} as DateTime64(18)) formatDateTime({datetime}, '%C %d %D %e %F %H %I %j %m %M %n %p %R %S %t %T %u %V %w %y %Y %%') """.splitlines() -# filter out empty lines and commented out lines -COMMENTED_OUT_LINE_RE = re.compile(r"^\s*#") -functions = list(filter(lambda f: len(f) != 0 and COMMENTED_OUT_LINE_RE.match(f) == None, functions)) - # Expanded later to cartesian product of all arguments. # NOTE: {N} to be turned into N after str.format() for keys (format string), but not for list of values! extra_ops =\ @@ -164,6 +160,10 @@ for funcs, args in extra_ops: result_func = func.format(**dict(zip(args_keys, args_vals))) functions.append(result_func) +# filter out empty lines and commented out lines +COMMENTED_OUT_LINE_RE = re.compile(r"^\s*#") +functions = list(filter(lambda f: len(f) != 0 and COMMENTED_OUT_LINE_RE.match(f) == None, functions)) + if sys.version_info[0] > 2: escape_string_codec = 'unicode_escape' else: