summaryrefslogtreecommitdiff
path: root/SCons/EnvironmentTests.py
diff options
context:
space:
mode:
Diffstat (limited to 'SCons/EnvironmentTests.py')
-rw-r--r--SCons/EnvironmentTests.py42
1 files changed, 21 insertions, 21 deletions
diff --git a/SCons/EnvironmentTests.py b/SCons/EnvironmentTests.py
index f28f05cf5..ef12a6fdc 100644
--- a/SCons/EnvironmentTests.py
+++ b/SCons/EnvironmentTests.py
@@ -101,7 +101,7 @@ class Builder(SCons.Builder.BuilderBase):
scanned_it = {}
-class Scanner(object):
+class Scanner:
"""A dummy Scanner class for testing purposes. "Scanning"
a target is simply setting a value in the dictionary.
"""
@@ -137,7 +137,7 @@ class CLVar(UL):
def __radd__(self, other):
return UL.__radd__(self, CLVar(other))
-class DummyNode(object):
+class DummyNode:
def __init__(self, name):
self.name = name
def __str__(self):
@@ -150,7 +150,7 @@ class DummyNode(object):
def test_tool( env ):
env['_F77INCFLAGS'] = '$( ${_concat(INCPREFIX, F77PATH, INCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)'
-class TestEnvironmentFixture(object):
+class TestEnvironmentFixture:
def TestEnvironment(self, *args, **kw):
if not kw or 'tools' not in kw:
kw['tools'] = [test_tool]
@@ -283,7 +283,7 @@ class SubstitutionTestCase(unittest.TestCase):
assert len(nodes) == 1, nodes
assert isinstance(nodes[0], SConsNode), nodes[0]
- class OtherNode(object):
+ class OtherNode:
pass
nodes = env.arg2nodes(OtherNode())
assert len(nodes) == 1, nodes
@@ -525,13 +525,13 @@ class SubstitutionTestCase(unittest.TestCase):
def test_subst_path(self):
"""Test substituting a path list
"""
- class MyProxy(object):
+ class MyProxy:
def __init__(self, val):
self.val = val
def get(self):
return self.val + '-proxy'
- class MyNode(object):
+ class MyNode:
def __init__(self, val):
self.val = val
def get_subst_proxy(self):
@@ -539,7 +539,7 @@ class SubstitutionTestCase(unittest.TestCase):
def __str__(self):
return self.val
- class MyObj(object):
+ class MyObj:
def get(self):
return self
@@ -571,7 +571,7 @@ class SubstitutionTestCase(unittest.TestCase):
r = env.subst_path(['$PROXY', MyProxy('my2'), n])
assert r == ['my1-proxy', 'my2-proxy', n], r
- class StringableObj(object):
+ class StringableObj:
def __init__(self, s):
self.s = s
def __str__(self):
@@ -899,7 +899,7 @@ class BaseTestCase(unittest.TestCase,TestEnvironmentFixture):
def test_variables(self):
"""Test that variables only get applied once."""
- class FakeOptions(object):
+ class FakeOptions:
def __init__(self, key, val):
self.calls = 0
self.key = key
@@ -1300,7 +1300,7 @@ env4.builder1.env, env3)
def test_platform(self):
"""Test specifying a platform callable when instantiating."""
- class platform(object):
+ class platform:
def __str__(self): return "TestPlatform"
def __call__(self, env): env['XYZZY'] = 777
@@ -1315,7 +1315,7 @@ env4.builder1.env, env3)
def test_Default_PLATFORM(self):
"""Test overriding the default PLATFORM variable"""
- class platform(object):
+ class platform:
def __str__(self): return "DefaultTestPlatform"
def __call__(self, env): env['XYZZY'] = 888
@@ -1599,7 +1599,7 @@ def exists(env):
assert isinstance(result, CLVar), repr(result)
assert result == ['foo', 'bar'], result
- class C(object):
+ class C:
def __init__(self, name):
self.name = name
def __str__(self):
@@ -1756,7 +1756,7 @@ def exists(env):
# Ensure that lists and dictionaries are
# deep copied, but not instances.
- class TestA(object):
+ class TestA:
pass
env1 = self.TestEnvironment(XXX=TestA(), YYY = [ 1, 2, 3 ],
ZZZ = { 1:2, 3:4 })
@@ -1999,7 +1999,7 @@ def generate(env):
RPATH=[])
orig_backtick = env.backtick
- class my_backtick(object):
+ class my_backtick:
def __init__(self, save_command, output):
self.save_command = save_command
self.output = output
@@ -2701,7 +2701,7 @@ def generate(env):
def test_VariantDir(self):
"""Test the VariantDir() method"""
- class MyFS(object):
+ class MyFS:
def Dir(self, name):
return name
def VariantDir(self, variant_dir, src_dir, duplicate):
@@ -2889,7 +2889,7 @@ def generate(env):
def test_Dir(self):
"""Test the Dir() method"""
- class MyFS(object):
+ class MyFS:
def Dir(self, name):
return 'Dir(%s)' % name
@@ -2952,7 +2952,7 @@ def generate(env):
def test_Execute(self):
"""Test the Execute() method"""
- class MyAction(object):
+ class MyAction:
def __init__(self, *args, **kw):
self.args = args
def __call__(self, target, source, env):
@@ -2966,7 +2966,7 @@ def generate(env):
def test_Entry(self):
"""Test the Entry() method"""
- class MyFS(object):
+ class MyFS:
def Entry(self, name):
return 'Entry(%s)' % name
@@ -2990,7 +2990,7 @@ def generate(env):
def test_File(self):
"""Test the File() method"""
- class MyFS(object):
+ class MyFS:
def File(self, name):
return 'File(%s)' % name
@@ -3138,7 +3138,7 @@ def generate(env):
def test_Repository(self):
"""Test the Repository() method."""
- class MyFS(object):
+ class MyFS:
def __init__(self):
self.list = []
def Repository(self, *dirs):
@@ -3176,7 +3176,7 @@ def generate(env):
"""Test the SConsignFile() method"""
import SCons.SConsign
- class MyFS(object):
+ class MyFS:
SConstruct_dir = os.sep + 'dir'
env = self.TestEnvironment(FOO = 'SConsign',