[tor-commits] [sbws/master] Add tests for sbws and torflow scaling
juga at torproject.org
juga at torproject.org
Tue Sep 18 09:26:12 UTC 2018
commit f5cf65ed59ec4f2ed860d84da14c112604e8e773
Author: juga0 <juga at riseup.net>
Date: Fri Aug 31 16:18:38 2018 +0000
Add tests for sbws and torflow scaling
---
tests/unit/lib/test_v3bwfile.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tests/unit/lib/test_v3bwfile.py b/tests/unit/lib/test_v3bwfile.py
index aed989f..b0001c1 100644
--- a/tests/unit/lib/test_v3bwfile.py
+++ b/tests/unit/lib/test_v3bwfile.py
@@ -146,5 +146,11 @@ def test_sbws_scale(datadir):
def test_torflow_scale(datadir):
results = load_result_file(str(datadir.join("results.txt")))
- v3bwfile = V3BWFile.from_results(results, scaling_method=SBWS_SCALING)
- assert v3bwfile.bw_lines[0].bw == 8
+ v3bwfile = V3BWFile.from_results(results, scaling_method=TORFLOW_SCALING)
+ assert v3bwfile.bw_lines[0].bw == 1000
+ v3bwfile = V3BWFile.from_results(results, scaling_method=TORFLOW_SCALING,
+ torflow_cap=0.0001)
+ assert v3bwfile.bw_lines[0].bw == 1000
+ v3bwfile = V3BWFile.from_results(results, scaling_method=TORFLOW_SCALING,
+ torflow_cap=1, torflow_round_digs=0)
+ assert v3bwfile.bw_lines[0].bw == 524
More information about the tor-commits
mailing list