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.py94
1 files changed, 47 insertions, 47 deletions
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py
index 9c4464b..42fef86 100644
--- a/src/engine/SCons/EnvironmentTests.py
+++ b/src/engine/SCons/EnvironmentTests.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/EnvironmentTests.py rel_2.3.5:3347:d31d5a4e74b6 2015/07/31 14:36:10 bdbaddog"
+__revision__ = "src/engine/SCons/EnvironmentTests.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
import SCons.compat
@@ -2703,25 +2703,25 @@ def generate(env):
t = env.AlwaysBuild('a', 'b$FOO', ['c', 'd'], '$BAR',
env.fs.Dir('dir'), env.fs.File('file'))
assert t[0].__class__.__name__ == 'Entry'
- assert t[0].path == 'a'
+ assert t[0].get_internal_path() == 'a'
assert t[0].always_build
assert t[1].__class__.__name__ == 'Entry'
- assert t[1].path == 'bfff'
+ assert t[1].get_internal_path() == 'bfff'
assert t[1].always_build
assert t[2].__class__.__name__ == 'Entry'
- assert t[2].path == 'c'
+ assert t[2].get_internal_path() == 'c'
assert t[2].always_build
assert t[3].__class__.__name__ == 'Entry'
- assert t[3].path == 'd'
+ assert t[3].get_internal_path() == 'd'
assert t[3].always_build
assert t[4].__class__.__name__ == 'Entry'
- assert t[4].path == 'bbb'
+ assert t[4].get_internal_path() == 'bbb'
assert t[4].always_build
assert t[5].__class__.__name__ == 'Dir'
- assert t[5].path == 'dir'
+ assert t[5].get_internal_path() == 'dir'
assert t[5].always_build
assert t[6].__class__.__name__ == 'File'
- assert t[6].path == 'file'
+ assert t[6].get_internal_path() == 'file'
assert t[6].always_build
def test_VariantDir(self):
@@ -2811,13 +2811,13 @@ def generate(env):
assert t.builder is not None
assert t.builder.action.__class__.__name__ == 'CommandAction'
assert t.builder.action.cmd_list == 'buildfoo $target $source'
- assert 'foo1.in' in [x.path for x in t.sources]
- assert 'foo2.in' in [x.path for x in t.sources]
+ assert 'foo1.in' in [x.get_internal_path() for x in t.sources]
+ assert 'foo2.in' in [x.get_internal_path() for x in t.sources]
sub = env.fs.Dir('sub')
t = env.Command(target='bar.out', source='sub',
action='buildbar $target $source')[0]
- assert 'sub' in [x.path for x in t.sources]
+ assert 'sub' in [x.get_internal_path() for x in t.sources]
def testFunc(env, target, source):
assert str(target[0]) == 'foo.out'
@@ -2828,8 +2828,8 @@ def generate(env):
assert t.builder is not None
assert t.builder.action.__class__.__name__ == 'FunctionAction'
t.build()
- assert 'foo1.in' in [x.path for x in t.sources]
- assert 'foo2.in' in [x.path for x in t.sources]
+ assert 'foo1.in' in [x.get_internal_path() for x in t.sources]
+ assert 'foo2.in' in [x.get_internal_path() for x in t.sources]
x = []
def test2(baz, x=x):
@@ -2846,7 +2846,7 @@ def generate(env):
action = 'foo',
X = 'xxx')[0]
assert str(t) == 'xxx.out', str(t)
- assert 'xxx.in' in [x.path for x in t.sources]
+ assert 'xxx.in' in [x.get_internal_path() for x in t.sources]
env = self.TestEnvironment(source_scanner = 'should_not_find_this')
t = env.Command(target='file.out', source='file.in',
@@ -2890,27 +2890,27 @@ def generate(env):
t = env.Depends(target='EnvironmentTest.py',
dependency='Environment.py')[0]
assert t.__class__.__name__ == 'Entry', t.__class__.__name__
- assert t.path == 'EnvironmentTest.py'
+ assert t.get_internal_path() == 'EnvironmentTest.py'
assert len(t.depends) == 1
d = t.depends[0]
assert d.__class__.__name__ == 'Entry', d.__class__.__name__
- assert d.path == 'Environment.py'
+ assert d.get_internal_path() == 'Environment.py'
t = env.Depends(target='${FOO}.py', dependency='${BAR}.py')[0]
assert t.__class__.__name__ == 'File', t.__class__.__name__
- assert t.path == 'xxx.py'
+ assert t.get_internal_path() == 'xxx.py'
assert len(t.depends) == 1
d = t.depends[0]
assert d.__class__.__name__ == 'File', d.__class__.__name__
- assert d.path == 'yyy.py'
+ assert d.get_internal_path() == 'yyy.py'
t = env.Depends(target='dir1', dependency='dir2')[0]
assert t.__class__.__name__ == 'Dir', t.__class__.__name__
- assert t.path == 'dir1'
+ assert t.get_internal_path() == 'dir1'
assert len(t.depends) == 1
d = t.depends[0]
assert d.__class__.__name__ == 'Dir', d.__class__.__name__
- assert d.path == 'dir2'
+ assert d.get_internal_path() == 'dir2'
def test_Dir(self):
"""Test the Dir() method"""
@@ -2944,19 +2944,19 @@ def generate(env):
t = env.NoClean('p_a', 'p_${BAR}b', ['p_c', 'p_d'], 'p_$FOO')
assert t[0].__class__.__name__ == 'Entry', t[0].__class__.__name__
- assert t[0].path == 'p_a'
+ assert t[0].get_internal_path() == 'p_a'
assert t[0].noclean
assert t[1].__class__.__name__ == 'Dir', t[1].__class__.__name__
- assert t[1].path == 'p_hhhb'
+ assert t[1].get_internal_path() == 'p_hhhb'
assert t[1].noclean
assert t[2].__class__.__name__ == 'Entry', t[2].__class__.__name__
- assert t[2].path == 'p_c'
+ assert t[2].get_internal_path() == 'p_c'
assert t[2].noclean
assert t[3].__class__.__name__ == 'File', t[3].__class__.__name__
- assert t[3].path == 'p_d'
+ assert t[3].get_internal_path() == 'p_d'
assert t[3].noclean
assert t[4].__class__.__name__ == 'Entry', t[4].__class__.__name__
- assert t[4].path == 'p_ggg'
+ assert t[4].get_internal_path() == 'p_ggg'
assert t[4].noclean
def test_Dump(self):
@@ -3074,27 +3074,27 @@ def generate(env):
t = env.Ignore(target='targ.py', dependency='dep.py')[0]
assert t.__class__.__name__ == 'Entry', t.__class__.__name__
- assert t.path == 'targ.py'
+ assert t.get_internal_path() == 'targ.py'
assert len(t.ignore) == 1
i = t.ignore[0]
assert i.__class__.__name__ == 'Entry', i.__class__.__name__
- assert i.path == 'dep.py'
+ assert i.get_internal_path() == 'dep.py'
t = env.Ignore(target='$FOO$BAR', dependency='$BAR$FOO')[0]
assert t.__class__.__name__ == 'File', t.__class__.__name__
- assert t.path == 'yyyzzz'
+ assert t.get_internal_path() == 'yyyzzz'
assert len(t.ignore) == 1
i = t.ignore[0]
assert i.__class__.__name__ == 'File', i.__class__.__name__
- assert i.path == 'zzzyyy'
+ assert i.get_internal_path() == 'zzzyyy'
t = env.Ignore(target='dir1', dependency='dir2')[0]
assert t.__class__.__name__ == 'Dir', t.__class__.__name__
- assert t.path == 'dir1'
+ assert t.get_internal_path() == 'dir1'
assert len(t.ignore) == 1
i = t.ignore[0]
assert i.__class__.__name__ == 'Dir', i.__class__.__name__
- assert i.path == 'dir2'
+ assert i.get_internal_path() == 'dir2'
def test_Literal(self):
"""Test the Literal() method"""
@@ -3123,19 +3123,19 @@ def generate(env):
t = env.Precious('p_a', 'p_${BAR}b', ['p_c', 'p_d'], 'p_$FOO')
assert t[0].__class__.__name__ == 'Entry', t[0].__class__.__name__
- assert t[0].path == 'p_a'
+ assert t[0].get_internal_path() == 'p_a'
assert t[0].precious
assert t[1].__class__.__name__ == 'Dir', t[1].__class__.__name__
- assert t[1].path == 'p_hhhb'
+ assert t[1].get_internal_path() == 'p_hhhb'
assert t[1].precious
assert t[2].__class__.__name__ == 'Entry', t[2].__class__.__name__
- assert t[2].path == 'p_c'
+ assert t[2].get_internal_path() == 'p_c'
assert t[2].precious
assert t[3].__class__.__name__ == 'File', t[3].__class__.__name__
- assert t[3].path == 'p_d'
+ assert t[3].get_internal_path() == 'p_d'
assert t[3].precious
assert t[4].__class__.__name__ == 'Entry', t[4].__class__.__name__
- assert t[4].path == 'p_ggg'
+ assert t[4].get_internal_path() == 'p_ggg'
assert t[4].precious
def test_Pseudo(self):
@@ -3146,19 +3146,19 @@ def generate(env):
t = env.Pseudo('p_a', 'p_${BAR}b', ['p_c', 'p_d'], 'p_$FOO')
assert t[0].__class__.__name__ == 'Entry', t[0].__class__.__name__
- assert t[0].path == 'p_a'
+ assert t[0].get_internal_path() == 'p_a'
assert t[0].pseudo
assert t[1].__class__.__name__ == 'Dir', t[1].__class__.__name__
- assert t[1].path == 'p_hhhb'
+ assert t[1].get_internal_path() == 'p_hhhb'
assert t[1].pseudo
assert t[2].__class__.__name__ == 'Entry', t[2].__class__.__name__
- assert t[2].path == 'p_c'
+ assert t[2].get_internal_path() == 'p_c'
assert t[2].pseudo
assert t[3].__class__.__name__ == 'File', t[3].__class__.__name__
- assert t[3].path == 'p_d'
+ assert t[3].get_internal_path() == 'p_d'
assert t[3].pseudo
assert t[4].__class__.__name__ == 'Entry', t[4].__class__.__name__
- assert t[4].path == 'p_ggg'
+ assert t[4].get_internal_path() == 'p_ggg'
assert t[4].pseudo
def test_Repository(self):
@@ -3263,7 +3263,7 @@ def generate(env):
bar = env.Object('bar.obj', 'bar.cpp')[0]
s = env.SideEffect('mylib.pdb', ['foo.obj', 'bar.obj'])[0]
assert s.__class__.__name__ == 'Entry', s.__class__.__name__
- assert s.path == 'mylib.pdb'
+ assert s.get_internal_path() == 'mylib.pdb'
assert s.side_effect
assert foo.side_effects == [s]
assert bar.side_effects == [s]
@@ -3272,7 +3272,7 @@ def generate(env):
bbb = env.Object('bbb.obj', 'bbb.cpp')[0]
s = env.SideEffect('my${LIB}.pdb', ['${FOO}.obj', '${BAR}.obj'])[0]
assert s.__class__.__name__ == 'File', s.__class__.__name__
- assert s.path == 'mylll.pdb'
+ assert s.get_internal_path() == 'mylll.pdb'
assert s.side_effect
assert fff.side_effects == [s], fff.side_effects
assert bbb.side_effects == [s], bbb.side_effects
@@ -3281,7 +3281,7 @@ def generate(env):
ccc = env.Object('ccc.obj', 'ccc.cpp')[0]
s = env.SideEffect('mymmm.pdb', ['ggg.obj', 'ccc.obj'])[0]
assert s.__class__.__name__ == 'Dir', s.__class__.__name__
- assert s.path == 'mymmm.pdb'
+ assert s.get_internal_path() == 'mymmm.pdb'
assert s.side_effect
assert ggg.side_effects == [s], ggg.side_effects
assert ccc.side_effects == [s], ccc.side_effects
@@ -3290,18 +3290,18 @@ def generate(env):
"""Test the SourceCode() method."""
env = self.TestEnvironment(FOO='mmm', BAR='nnn')
e = env.SourceCode('foo', None)[0]
- assert e.path == 'foo'
+ assert e.get_internal_path() == 'foo'
s = e.src_builder()
assert s is None, s
b = Builder()
e = env.SourceCode(e, b)[0]
- assert e.path == 'foo'
+ assert e.get_internal_path() == 'foo'
s = e.src_builder()
assert s is b, s
e = env.SourceCode('$BAR$FOO', None)[0]
- assert e.path == 'nnnmmm'
+ assert e.get_internal_path() == 'nnnmmm'
s = e.src_builder()
assert s is None, s