#!/www/python/bin/python
"""
$URL: svn+ssh://svn.mems-exchange.org/repos/trunk/dulcinea/lib/test/utest_timestamped.py $
$Id: utest_timestamped.py 25452 2004-10-26 17:23:37Z dbinger $
"""
"""$URL: svn+ssh://svn.mems-exchange.org/repos/trunk/dulcinea/lib/test/utest_timestamped.py $
$Id: utest_timestamped.py 25452 2004-10-26 17:23:37Z dbinger $
"""
from sancho.utest import UTest
from dulcinea.timestamped import Timestamped, timestamp_sorted, \
     reverse_timestamp_sorted


class Test (UTest):

    def a(self):
        x = Timestamped()
        y = Timestamped()
        assert timestamp_sorted([x, y]) == [x,y]
        assert reverse_timestamp_sorted([x, y]) == [y,x]
        x.set_timestamp()
        assert timestamp_sorted([x, y]) == [y,x]

if __name__ == "__main__":
    Test()
