Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5_fork
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5_fork
Commits
a9755e5b
Commit
a9755e5b
authored
Aug 01, 2011
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve verbose.
parent
813f2f89
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
product/ERP5Type/tests/testCacheTool.py
product/ERP5Type/tests/testCacheTool.py
+4
-4
No files found.
product/ERP5Type/tests/testCacheTool.py
View file @
a9755e5b
...
...
@@ -259,7 +259,7 @@ return result
# operation even remote cache must have access time less than a second.
# if it's greater than method wasn't previously cached and was calculated
# instead
self
.
assert_
(
1.0
>
calculation_time
)
self
.
assert_
(
1.0
>
calculation_time
,
"1.0 <= %s"
%
calculation_time
)
## check if equal.
self
.
assertEquals
(
cached
,
result
)
...
...
@@ -485,7 +485,7 @@ return 'a' * 1024 * 1024 * 25
end
=
time
.
time
()
calculation_time
=
end
-
start
print
"
\
n
\
t
Calculation time (1st call)"
,
calculation_time
self
.
assertTrue
(
calculation_time
>
1.0
)
self
.
assertTrue
(
calculation_time
>
1.0
,
"%s <= 1.0"
%
calculation_time
)
## 2nd call - should be cached now
start
=
time
.
time
()
...
...
@@ -494,7 +494,7 @@ return 'a' * 1024 * 1024 * 25
end
=
time
.
time
()
calculation_time
=
end
-
start
print
"
\
n
\
t
Calculation time (2nd call)"
,
calculation_time
self
.
assertTrue
(
calculation_time
<
1.0
)
self
.
assertTrue
(
calculation_time
<
1.0
,
"%s >= 1.0"
%
calculation_time
)
# Wait expiration period then check that value is computed
# .1 is an additional epsilon delay to work around time precision issues
...
...
@@ -509,7 +509,7 @@ return 'a' * 1024 * 1024 * 25
end
=
time
.
time
()
calculation_time
=
end
-
start
print
"
\
n
\
t
Calculation time (3rd call)"
,
calculation_time
self
.
assertTrue
(
calculation_time
>
1.0
)
self
.
assertTrue
(
calculation_time
>
1.0
,
"%s <= 1.0"
%
calculation_time
)
def
test_99_CachePluginInterface
(
self
):
"""Test Class against Interface
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment