summaryrefslogtreecommitdiff
path: root/src/engine/SCons/EnvironmentTests.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/EnvironmentTests.py')
-rw-r--r--src/engine/SCons/EnvironmentTests.py24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py
index 70eda9e..b97ac5c 100644
--- a/src/engine/SCons/EnvironmentTests.py
+++ b/src/engine/SCons/EnvironmentTests.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001 - 2017 The SCons Foundation
+# Copyright (c) 2001 - 2019 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -23,7 +23,7 @@
from __future__ import print_function
-__revision__ = "src/engine/SCons/EnvironmentTests.py rel_3.0.0:4395:8972f6a2f699 2017/09/18 12:59:24 bdbaddog"
+__revision__ = "src/engine/SCons/EnvironmentTests.py 103260fce95bf5db1c35fb2371983087d85dd611 2019-07-13 18:25:30 bdbaddog"
import SCons.compat
@@ -139,10 +139,6 @@ class CLVar(UL):
return UL.__add__(self, CLVar(other))
def __radd__(self, other):
return UL.__radd__(self, CLVar(other))
- def __coerce__(self, other):
- return (self, CLVar(other))
-
-
class DummyNode(object):
def __init__(self, name):
@@ -967,7 +963,7 @@ class BaseTestCase(unittest.TestCase,TestEnvironmentFixture):
self.assertRaises(AttributeError, getattr, bw, 'foobar')
bw.foobar = 42
- assert bw.foobar is 42
+ assert bw.foobar == 42
# This unit test is currently disabled because we don't think the
# underlying method it tests (Environment.BuilderWrapper.execute())
@@ -1627,9 +1623,9 @@ def exists(env):
env1.AppendENVPath('PATH',r'C:\dir\num\two', sep = ';')
env1.AppendENVPath('PATH',r'C:\dir\num\three', sep = ';')
env1.AppendENVPath('MYPATH',r'C:\mydir\num\three','MYENV', sep = ';')
- env1.AppendENVPath('MYPATH',r'C:\mydir\num\one','MYENV', sep = ';')
+ env1.AppendENVPath('MYPATH',r'C:\mydir\num\one','MYENV', sep = ';', delete_existing=1)
# this should do nothing since delete_existing is 0
- env1.AppendENVPath('MYPATH',r'C:\mydir\num\three','MYENV', sep = ';', delete_existing=0)
+ env1.AppendENVPath('MYPATH',r'C:\mydir\num\three','MYENV', sep = ';')
assert(env1['ENV']['PATH'] == r'C:\dir\num\one;C:\dir\num\two;C:\dir\num\three')
assert(env1['MYENV']['MYPATH'] == r'C:\mydir\num\two;C:\mydir\num\three;C:\mydir\num\one')
@@ -1781,15 +1777,15 @@ def exists(env):
env2 = env1.Clone()
env3 = env1.Clone(tools=[bar, baz])
- assert env1.get('FOO') is 1
+ assert env1.get('FOO') == 1
assert env1.get('BAR') is None
assert env1.get('BAZ') is None
- assert env2.get('FOO') is 1
+ assert env2.get('FOO') == 1
assert env2.get('BAR') is None
assert env2.get('BAZ') is None
- assert env3.get('FOO') is 1
- assert env3.get('BAR') is 2
- assert env3.get('BAZ') is 3
+ assert env3.get('FOO') == 1
+ assert env3.get('BAR') == 2
+ assert env3.get('BAZ') == 3
# Ensure that recursive variable substitution when copying
# environments works properly.