Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Network Health
sbws
Commits
b7d8be9b
Commit
b7d8be9b
authored
Jun 20, 2018
by
Matt Traudt
Browse files
Allow up to 10% error in RelayBandwidthRate test
parent
c7eda42e
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/integration/core/test_scanner.py
View file @
b7d8be9b
...
@@ -81,7 +81,7 @@ def test_measure_relay_with_relaybandwidthrate(
...
@@ -81,7 +81,7 @@ def test_measure_relay_with_relaybandwidthrate(
result
=
result
[
0
]
result
=
result
[
0
]
assert
isinstance
(
result
,
ResultSuccess
)
assert
isinstance
(
result
,
ResultSuccess
)
one_mbyte
=
1
*
1024
*
1024
one_mbyte
=
1
*
1024
*
1024
allowed_error
=
5
# bytes per sec
on
d
allowed_error
=
0.1
*
one_mbyte
# allow 10% error in either directi
on
dls
=
result
.
downloads
dls
=
result
.
downloads
for
dl
in
dls
:
for
dl
in
dls
:
assert_within
(
dl
[
'amount'
]
/
dl
[
'duration'
],
one_mbyte
,
allowed_error
)
assert_within
(
dl
[
'amount'
]
/
dl
[
'duration'
],
one_mbyte
,
allowed_error
)
Write
Preview
Supports
Markdown
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