Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rafael Monnerat
erp5
Commits
9bcb98c4
Commit
9bcb98c4
authored
Aug 01, 2011
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increase verbose into all asserts.
parent
88decb76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
product/ERP5Type/tests/testCacheTool.py
product/ERP5Type/tests/testCacheTool.py
+6
-6
No files found.
product/ERP5Type/tests/testCacheTool.py
View file @
9bcb98c4
...
@@ -259,7 +259,7 @@ return result
...
@@ -259,7 +259,7 @@ return result
# operation even remote cache must have access time less than a second.
# 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
# if it's greater than method wasn't previously cached and was calculated
# instead
# instead
self
.
assert
_
(
1.0
>
calculation_time
,
"1.0 <= %s"
%
calculation_time
)
self
.
assert
True
(
1.0
>
calculation_time
,
"1.0 <= %s"
%
calculation_time
)
## check if equal.
## check if equal.
self
.
assertEquals
(
cached
,
result
)
self
.
assertEquals
(
cached
,
result
)
...
@@ -277,7 +277,7 @@ return result
...
@@ -277,7 +277,7 @@ return result
calculation_time
=
end
-
start
calculation_time
=
end
-
start
print
"
\
n
\
t
Calculation time (after cache clear)"
,
calculation_time
print
"
\
n
\
t
Calculation time (after cache clear)"
,
calculation_time
## Cache cleared shouldn't be previously cached
## Cache cleared shouldn't be previously cached
self
.
assert
_
(
1.0
<
calculation_time
)
self
.
assert
True
(
1.0
<
calculation_time
,
"1.0 >= %s"
%
calculation_time
)
self
.
assertEquals
(
cached
,
result
)
self
.
assertEquals
(
cached
,
result
)
...
@@ -303,7 +303,7 @@ return result
...
@@ -303,7 +303,7 @@ return result
end
=
time
.
time
()
end
=
time
.
time
()
calculation_time
=
end
-
start
calculation_time
=
end
-
start
print
"
\
n
\
t
Calculation time (4th call)"
,
calculation_time
print
"
\
n
\
t
Calculation time (4th call)"
,
calculation_time
self
.
assert
_
(
1.0
<
calculation_time
)
self
.
assert
True
(
1.0
<
calculation_time
,
"1.0 >= %s"
%
calculation_time
)
self
.
assertEquals
(
cached
,
result
)
self
.
assertEquals
(
cached
,
result
)
transaction
.
commit
()
transaction
.
commit
()
...
@@ -359,7 +359,7 @@ return result
...
@@ -359,7 +359,7 @@ return result
end
=
time
.
time
()
end
=
time
.
time
()
calculation_time
=
end
-
start
calculation_time
=
end
-
start
print
"
\
n
\
t
Calculation time (2nd call)"
,
calculation_time
print
"
\
n
\
t
Calculation time (2nd call)"
,
calculation_time
self
.
assert
_
(
1.0
>
calculation_time
)
self
.
assert
True
(
1.0
>
calculation_time
,
"1.0 <= %s"
%
calculation_time
)
self
.
assertEquals
(
cached
,
result
)
self
.
assertEquals
(
cached
,
result
)
transaction
.
commit
()
transaction
.
commit
()
...
@@ -373,7 +373,7 @@ return result
...
@@ -373,7 +373,7 @@ return result
end
=
time
.
time
()
end
=
time
.
time
()
calculation_time
=
end
-
start
calculation_time
=
end
-
start
print
"
\
n
\
t
Calculation time (3rd call)"
,
calculation_time
print
"
\
n
\
t
Calculation time (3rd call)"
,
calculation_time
self
.
assert
_
(
1.0
>
calculation_time
)
self
.
assert
True
(
1.0
>
calculation_time
,
"1.0 <= %s"
%
calculation_time
)
self
.
assertEquals
(
cached
,
result
)
self
.
assertEquals
(
cached
,
result
)
transaction
.
commit
()
transaction
.
commit
()
...
@@ -455,7 +455,7 @@ return 'a' * 1024 * 1024 * 25
...
@@ -455,7 +455,7 @@ return 'a' * 1024 * 1024 * 25
end
=
time
.
time
()
end
=
time
.
time
()
calculation_time
=
end
-
start
calculation_time
=
end
-
start
print
"
\
n
\
t
Calculation time (2nd call)"
,
calculation_time
print
"
\
n
\
t
Calculation time (2nd call)"
,
calculation_time
self
.
assert
_
(
1.0
>
calculation_time
)
self
.
assert
True
(
1.0
>
calculation_time
,
"1.0 <= %s"
%
calculation_time
)
self
.
assertEquals
(
cached
,
result
)
self
.
assertEquals
(
cached
,
result
)
transaction
.
commit
()
transaction
.
commit
()
...
...
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