[tor-commits] [stem/master] Only compare relative sizes in tests
atagar at torproject.org
atagar at torproject.org
Mon Aug 21 19:54:08 UTC 2017
commit aaa668ba80493900ba8d4b37d0aa91a67b134813
Author: Damian Johnson <atagar at torproject.org>
Date: Mon Aug 21 12:54:26 2017 -0700
Only compare relative sizes in tests
On jenkins this new test is failing since object sizes fall outside the range
we assert. I thought these would be wide enough but evidently not. That's fine
- we don't care about the absolute values anyway.
---
test/unit/util/system.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/test/unit/util/system.py b/test/unit/util/system.py
index 0f61963d..a957a23f 100644
--- a/test/unit/util/system.py
+++ b/test/unit/util/system.py
@@ -153,10 +153,8 @@ class TestSystem(unittest.TestCase):
Exercises the size_of function.
"""
- self.assertTrue(10 < system.size_of('hello') < 50)
- self.assertTrue(10 < system.size_of([]) < 50)
+ self.assertTrue(system.size_of('') < system.size_of('hello') < system.size_of('hello world'))
self.assertTrue(system.size_of([]) < system.size_of(['hello']) < system.size_of(['hello', 'world']))
- self.assertTrue(100 < system.size_of({'hello': 'world'}) < 300)
self.assertTrue(system.size_of({}) < system.size_of({'hello': 'world'}) < system.size_of({'hello': 'world', 'more': 'stuff'}))
@patch('stem.util.system.call')
More information about the tor-commits
mailing list