Skip to content

Commit

Permalink
[PR #3211] fix a couple of bugs
Browse files Browse the repository at this point in the history
Since the last time this was built, Travis and Appveyor run
more tests, and that turned up some missed locations that
needed updating.

Signed-off-by: Mats Wichmann <mats@linux.com>
  • Loading branch information
mwichmann committed Apr 12, 2019
1 parent d830eb0 commit 68c74cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/engine/SCons/EnvironmentTests.py
Expand Up @@ -1751,7 +1751,7 @@ class TestA(object):
env2.Dictionary()['ZZZ'][5] = 6
assert env1.Dictionary()['XXX'] == env2.Dictionary()['XXX']
assert 4 in env2.Dictionary()['YYY']
assert not 4 in env1.Dictionary()['YYY']
assert 4 not in env1.Dictionary()['YYY']
assert 5 in env2.Dictionary()['ZZZ']
assert 5 not in env1.Dictionary()['ZZZ']

Expand Down Expand Up @@ -1944,7 +1944,7 @@ def test_Dictionary(self):
env = self.TestEnvironment(XXX = 'x', YYY = 'y', ZZZ = 'z')
assert env.Dictionary()['XXX'] == 'x'
assert env.Dictionary()['YYY'] == 'y'
assert not {'x', 'z'}.difference(env.Dictionary('XXX', 'ZZZ').values())
assert set(env.Dictionary('XXX', 'ZZZ').values()) == {'x', 'z'}
xxx = env.Dictionary('XXX', 'ZZZ')
assert xxx['XXX'] == 'x'
assert xxx['ZZZ'] == 'z'
Expand Down Expand Up @@ -2929,7 +2929,8 @@ def test_NoClean(self):
def test_Dump(self):
"""Test the Dump() method"""

# this is to format the expected string
# this is to format the expected string to match,
# since Dump() uses the same method to format
import pprint
pp = pprint.PrettyPrinter(indent=2)
expect = pp.pformat({'FOO': 'foo'})
Expand Down
2 changes: 1 addition & 1 deletion test/LEX/live_mingw.py
Expand Up @@ -53,7 +53,7 @@
test.write('SConstruct', """
foo = Environment(tools=['default', 'mingw', 'lex'], LEXUNISTD="")
lex = foo.Dictionary('LEX')
bar = Environment(LEX = r'%(_python_)s wrapper.py ' + lex,
bar = Environment(LEX=r'%(_python_)s wrapper.py ' + lex['LEX'],
LEXFLAGS = '-b',
LEXUNISTD="",
tools=['default', 'mingw', 'lex'])
Expand Down
2 changes: 1 addition & 1 deletion test/LEX/no_lex.py
Expand Up @@ -48,7 +48,7 @@ def Detect(self, progs):
print(foo.Dictionary('LEX'))
""" % locals())

test.run(arguments = '-Q -s', stdout = 'None\n' )
test.run(arguments = '-Q -s', stdout = "{'LEX': None}\n" )

test.pass_test()

Expand Down

0 comments on commit 68c74cd

Please sign in to comment.