summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Scanner
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-09-26 00:38:48 (GMT)
committerSteven Knight <knight@baldmt.com>2004-09-26 00:38:48 (GMT)
commit9abe06e588efa61e6df7bc77922386d84aed15ba (patch)
tree5d3e8de35555081419ecd99cd637937de9feb7bc /src/engine/SCons/Scanner
parent824749c2c1fbef46257a81adacea25136cb1e583 (diff)
downloadSCons-9abe06e588efa61e6df7bc77922386d84aed15ba.zip
SCons-9abe06e588efa61e6df7bc77922386d84aed15ba.tar.gz
SCons-9abe06e588efa61e6df7bc77922386d84aed15ba.tar.bz2
Apply Scanner.Scanner args to the Base class initialization correctly. (Kevin Quick)
Diffstat (limited to 'src/engine/SCons/Scanner')
-rw-r--r--src/engine/SCons/Scanner/ScannerTests.py13
-rw-r--r--src/engine/SCons/Scanner/__init__.py2
2 files changed, 14 insertions, 1 deletions
diff --git a/src/engine/SCons/Scanner/ScannerTests.py b/src/engine/SCons/Scanner/ScannerTests.py
index 3c460c2..2115c70 100644
--- a/src/engine/SCons/Scanner/ScannerTests.py
+++ b/src/engine/SCons/Scanner/ScannerTests.py
@@ -82,6 +82,19 @@ class ScannerTestCase(unittest.TestCase):
s = SCons.Scanner.Scanner({})
assert isinstance(s, SCons.Scanner.Selector), s
+ s = SCons.Scanner.Scanner(func, name='fooscan')
+ assert str(s) == 'fooscan', str(s)
+ s = SCons.Scanner.Scanner({}, name='barscan')
+ assert str(s) == 'barscan', str(s)
+
+ s = SCons.Scanner.Scanner(func, name='fooscan', argument=9)
+ assert str(s) == 'fooscan', str(s)
+ assert s.argument == 9, s.argument
+ s = SCons.Scanner.Scanner({}, name='fooscan', argument=888)
+ assert str(s) == 'fooscan', str(s)
+ assert s.argument == 888, s.argument
+
+
class BaseTestCase(unittest.TestCase):
def func(self, filename, env, target, *args):
diff --git a/src/engine/SCons/Scanner/__init__.py b/src/engine/SCons/Scanner/__init__.py
index f134b2d..f1b85e8 100644
--- a/src/engine/SCons/Scanner/__init__.py
+++ b/src/engine/SCons/Scanner/__init__.py
@@ -244,7 +244,7 @@ class Selector(Base):
scanner_key() (suffix) for a specific Node.
"""
def __init__(self, dict, *args, **kw):
- Base.__init__(self, (None,)+args, kw)
+ apply(Base.__init__, (self, None,)+args, kw)
self.dict = dict
def __call__(self, node, env, path = ()):