blob: 92bc1958b25817f6fdf66904e7698f9a0c34a59f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
__revision__ = "Node/NodeTests.py __REVISION__ __DATE__ __DEVELOPER__"
import os
import sys
import unittest
from scons.Node import Node
built_it = None
class Builder:
def execute(self, target = None, source = None):
global built_it
built_it = 1
class NodeTestCase(unittest.TestCase):
def test_build(self):
"""Test the ability to build a node.
"""
node = Node()
node.builder_set(Builder())
node.path = "xxx" # XXX FAKE SUBCLASS ATTRIBUTE
node.sources = "yyy" # XXX FAKE SUBCLASS ATTRIBUTE
node.build()
assert built_it
def test_builder_set(self):
node = Node()
b = Builder()
node.builder_set(b)
assert node.builder == b
if __name__ == "__main__":
suite = unittest.makeSuite(NodeTestCase, 'test_')
if not unittest.TextTestRunner().run(suite).wasSuccessful():
sys.exit(1)
|