From 4a0cd4864a82803c414023e69e5ba9419c295309 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 18 May 2020 11:22:30 -0700 Subject: change test to change expected line # depending on python version --- test/packaging/rpm/explicit-target.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/packaging/rpm/explicit-target.py b/test/packaging/rpm/explicit-target.py index 0cf486e..66f5e4a 100644 --- a/test/packaging/rpm/explicit-target.py +++ b/test/packaging/rpm/explicit-target.py @@ -30,6 +30,7 @@ Test the ability to create a rpm package from a explicit target name. import os import TestSCons +import sys _python_ = TestSCons._python_ @@ -75,9 +76,15 @@ env.Package( NAME = 'foo', ) """ % locals()) + +if sys.version_info.minor >= 8: + line_number = 12 +else: + line_number = 23 + expect = """ scons: *** Setting target is not supported for rpm. -""" + test.python_file_line(test.workpath('SConstruct'), 12) +""" + test.python_file_line(test.workpath('SConstruct'), line_number) test.run(arguments='', status=2, stderr=expect) -- cgit v0.12