Page MenuHomec4science

ut_tools.py
No OneTemporary

File Metadata

Created
Wed, Jun 19, 14:10

ut_tools.py

# -*- coding: latin-1 -*-
import os, pybut, sys
from Pyblio import Tools
class TestTools (pybut.TestCase):
""" Perform tests on the Pyblio.Tools module """
def testIdMake (self):
""" Check the id generator """
# No proposal
k = Tools.id_make (1, None)
assert k == (2, 1)
# The proposed id is smaller than the latest
k = Tools.id_make (2, 1)
assert k == (2, 1)
# The proposed id is larget than the latest
k = Tools.id_make (2, 4)
assert k == (5, 4)
return
suite = pybut.suite (TestTools)
if __name__ == '__main__': pybut.run (suite)

Event Timeline