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

[tor-commits] [sbws/master] tests, v3bwfile: rename bwl_str to raw_bwl_str



commit 9f537092cae2611f16f298a04175034e21360de5
Author: juga0 <juga@xxxxxxxxxx>
Date:   Wed Nov 21 13:36:45 2018 +0000

    tests, v3bwfile: rename bwl_str to raw_bwl_str
---
 tests/unit/lib/test_v3bwfile.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/unit/lib/test_v3bwfile.py b/tests/unit/lib/test_v3bwfile.py
index 2987aca..f9c50d5 100644
--- a/tests/unit/lib/test_v3bwfile.py
+++ b/tests/unit/lib/test_v3bwfile.py
@@ -38,7 +38,8 @@ header_extra_ls = [timestamp_l, version_l,
                    software_l, software_version_l, TERMINATOR]
 header_extra_str = LINE_SEP.join(header_extra_ls) + LINE_SEP
 
-bwl_str = "bw=56 bw_mean=61423 bw_median=55656 "\
+# Line produced without any scaling.
+raw_bwl_str = "bw=56 bw_mean=61423 bw_median=55656 "\
     "desc_bw_avg=1000000000 desc_bw_obs_last=524288 "\
     "desc_bw_obs_mean=524288 error_circ=0 error_misc=0 error_stream=1 " \
     "master_key_ed25519=g+Shk00y9Md0hg1S6ptnuc/wWKbADBgdjT0Kg+TSF3s " \
@@ -46,7 +47,7 @@ bwl_str = "bw=56 bw_mean=61423 bw_median=55656 "\
     "node_id=$AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA rtt=456 success=1 " \
     "time=2018-04-17T14:09:07\n"
 
-v3bw_str = header_extra_str + bwl_str
+v3bw_str = header_extra_str + raw_bwl_str
 
 
 def test_v3bwheader_str():
@@ -219,7 +220,7 @@ def test_v3bwline_from_results_file(datadir):
     bwl = V3BWLine.from_data(d, fp)
     # bw store now B, not KB
     bwl.bw = round(bwl.bw / 1000)
-    assert bwl_str == str(bwl)
+    assert raw_bwl_str == str(bwl)
 
 
 def test_from_results_read(datadir, tmpdir, conf, args):

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