Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F67040644
ut_tools.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Jun 19, 14:10
Size
649 B
Mime Type
text/x-python
Expires
Fri, Jun 21, 14:10 (2 d)
Engine
blob
Format
Raw Data
Handle
18331790
Attached To
R3596 pybliographer
ut_tools.py
View Options
# -*- 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
Log In to Comment