Source

SCons / src / scons / Sig / TimeStampTests.py

__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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.