From a690d471a4a2c688ea712083ae416e059acf27c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Tue, 26 Jun 2012 17:46:37 +0000 Subject: [PATCH] Updated the Boost Build core_nt_cmd_line.py test to make it compatible with the ancient Python releases prior to Python version 2.5. It seems those versions do not support the 'x = 1 if condition else 2' construct and report it as a SyntaxError. [SVN r79119] --- test/core_nt_cmd_line.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/core_nt_cmd_line.py b/test/core_nt_cmd_line.py index f558b78a1..8c407db54 100755 --- a/test/core_nt_cmd_line.py +++ b/test/core_nt_cmd_line.py @@ -96,7 +96,11 @@ actions do_echo JAMSHELL = %% ; do_echo all ; """ % (cmd_prefix, string_of_length(data_length), cmd_suffix)) - t.run_build_system("-ffile.jam", status=1 if error else 0) + if error: + expected_status = 1 + else: + expected_status = 0 + t.run_build_system("-ffile.jam", status=expected_status) if error: t.expect_output_line("Executing raw command directly", False) t.expect_output_line("do_echo action is too long (%d, max 32766):" % n)