Skip to content

Commit 78a26bb

Browse files
committed
Fix test for bad construction var
Didn't notice that the changes for env.__setitem__ caused a quote mark to flip in the error output, failing one test (a back-quote went to a single regular quote). Updated the test, and snuck in the tools-performance-hack. Signed-off-by: Mats Wichmann <mats@linux.com>
1 parent 2303fb9 commit 78a26bb

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

test/bad-variables.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/env python
22
#
3-
# __COPYRIGHT__
3+
# MIT License
4+
#
5+
# Copyright The SCons Foundation
46
#
57
# Permission is hereby granted, free of charge, to any person obtaining
68
# a copy of this software and associated documentation files (the
@@ -20,9 +22,6 @@
2022
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
2123
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
2224
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23-
#
24-
25-
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
2625

2726
"""
2827
Test that setting illegal construction variables fails in ways that are
@@ -37,13 +36,14 @@
3736
SConscript_path = test.workpath('SConscript')
3837

3938
test.write(SConstruct_path, """\
40-
env = Environment()
39+
_ = DefaultEnvironment(tools=[])
40+
env = Environment(tools=[])
4141
env['foo-bar'] = 1
4242
""")
4343

4444
expect_stderr = """
45-
scons: *** Illegal construction variable `foo-bar'
46-
""" + test.python_file_line(SConstruct_path, 2)
45+
scons: *** Illegal construction variable 'foo-bar'
46+
""" + test.python_file_line(SConstruct_path, 3)
4747

4848
test.run(arguments='.', status=2, stderr=expect_stderr)
4949

@@ -54,14 +54,15 @@
5454
""")
5555

5656
test.write('SConscript', """\
57-
env = Environment()
57+
_ = DefaultEnvironment(tools=[])
58+
env = Environment(tools=[])
5859
env['foo(bar)'] = 1
5960
""")
6061

6162

6263
expect_stderr = """
63-
scons: *** Illegal construction variable `foo(bar)'
64-
""" + test.python_file_line(SConscript_path, 2)
64+
scons: *** Illegal construction variable 'foo(bar)'
65+
""" + test.python_file_line(SConscript_path, 3)
6566

6667
test.run(arguments='.', status=2, stderr=expect_stderr)
6768

0 commit comments

Comments
 (0)