[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [sbws/master] Fix the torflow scaling unit tests



commit d633278863d31772a22e1984048799b76d696dcf
Author: teor <teor@xxxxxxxxxxxxxx>
Date:   Wed Nov 14 20:53:16 2018 +1000

    Fix the torflow scaling unit tests
    
    Part of 28442.
---
 tests/unit/lib/test_v3bwfile.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/unit/lib/test_v3bwfile.py b/tests/unit/lib/test_v3bwfile.py
index db82a6c..21a613b 100644
--- a/tests/unit/lib/test_v3bwfile.py
+++ b/tests/unit/lib/test_v3bwfile.py
@@ -259,13 +259,13 @@ 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=TORFLOW_SCALING)
-    assert v3bwfile.bw_lines[0].bw == 1000
+    assert v3bwfile.bw_lines[0].bw == 524
     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
+    v3bwfile = V3BWFile.from_results(results, scaling_method=TORFLOW_SCALING,
+                                     torflow_cap=1, torflow_round_digs=1)
+    assert v3bwfile.bw_lines[0].bw == 500
 
 
 def test_results_away_each_other(datadir):



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits