blob: aa61af80efbc4b779be2af983722726c055e5e86 (
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
__revision__ = "Sig/TimeStampTests.py __REVISION__ __DATE__ __DEVELOPER__"
import sys
import unittest
import scons.Sig.TimeStamp
class my_obj:
"""A dummy object class that satisfies the interface
requirements of the TimeStamp class.
"""
def __init__(self, value = ""):
self.value = value
def signature(self):
return self.value
class TimeStampTestCase(unittest.TestCase):
def test__init(self):
pass # XXX
def test__init(self):
pass # XXX
def test__end(self):
pass # XXX
def test_current(self):
"""Test the ability to decide if an object is up-to-date
with different timestamp values.
"""
o1 = my_obj(value = 111)
assert scons.Sig.TimeStamp.current(o1, 110)
assert scons.Sig.TimeStamp.current(o1, 111)
assert not scons.Sig.TimeStamp.current(o1, 112)
def test_set(self):
pass # XXX
def test_invalidate(self):
pass # XXX
def test_collect(self):
"""Test the ability to collect a sequence of object timestamps
into a new timestamp value.
"""
o1 = my_obj(value = 111)
o2 = my_obj(value = 222)
o3 = my_obj(value = 333)
assert 111 == scons.Sig.TimeStamp.collect(o1)
assert 222 == scons.Sig.TimeStamp.collect(o1, o2)
assert 333 == scons.Sig.TimeStamp.collect(o1, o2, o3)
def test_signature(self):
pass # XXX
def test_cmdsig(self):
pass # XXX
def test_srcsig(self):
pass # XXX
if __name__ == "__main__":
suite = unittest.makeSuite(TimeStampTestCase, 'test_')
if not unittest.TextTestRunner().run(suite).wasSuccessful():
sys.exit(1)
|