Commit b7d8be9b authored by Matt Traudt's avatar Matt Traudt
Browse files

Allow up to 10% error in RelayBandwidthRate test

parent c7eda42e
...@@ -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 second allowed_error = 0.1 * one_mbyte # allow 10% error in either direction
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)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment