diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2021-01-14 13:11:48 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2021-01-14 14:30:38 +0100 |
commit | 5541bb16cec1623be63188f25048cdb75ab26843 (patch) | |
tree | 0f00055d94af3579f8e5991f6ede857e9eae8fc0 /tests | |
parent | e902dbd9ad1a045c29f295c0099e42f5ff7e91d8 (diff) | |
download | m2crypto-5541bb16cec1623be63188f25048cdb75ab26843.tar.gz |
Remove superfluous variables in test_bn.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_bn.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/test_bn.py b/tests/test_bn.py index 560bebd..aa3065e 100644 --- a/tests/test_bn.py +++ b/tests/test_bn.py @@ -19,24 +19,24 @@ class BNTestCase(unittest.TestCase): def test_rand(self): # defaults - for x in range(loops): + for _ in range(loops): r8 = BN.rand(8) # top - for x in range(loops): + for _ in range(loops): r8 = BN.rand(8, top=0) assert r8 & 128 - for x in range(loops): + for _ in range(loops): r8 = BN.rand(8, top=1) assert r8 & 192 # bottom - for x in range(loops): + for _ in range(loops): r8 = BN.rand(8, bottom=1) assert r8 % 2 == 1 # make sure we can get big numbers and work with them - for x in range(loops): + for _ in range(loops): r8 = BN.rand(8, top=0) r16 = BN.rand(16, top=0) r32 = BN.rand(32, top=0) @@ -48,23 +48,23 @@ class BNTestCase(unittest.TestCase): def test_rand_range(self): # small range - for x in range(loops): + for _ in range(loops): r = BN.rand_range(1) self.assertEqual(r, 0) - for x in range(loops): + for _ in range(loops): r = BN.rand_range(4) assert 0 <= r < 4 # large range r512 = BN.rand(512, top=0) - for x in range(loops): + for _ in range(loops): r = BN.rand_range(r512) assert 0 <= r < r512 def test_randfname(self): m = re.compile('^[a-zA-Z0-9]{8}$') - for x in range(loops): + for _ in range(loops): with warnings.catch_warnings(): warnings.simplefilter('ignore', DeprecationWarning) r = BN.randfname(8) |