mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-05 03:18:50 +02:00
test: create assert_not_equal util and add to where imports are needed
In the functional tests there are lots of cases where we assert != which this new util will replace, we also are adding the imports and the new assertion
This commit is contained in:
@@ -17,6 +17,7 @@ Exports:
|
||||
|
||||
import unittest
|
||||
from hashlib import sha256
|
||||
from test_framework.util import assert_not_equal
|
||||
|
||||
class FE:
|
||||
"""Objects of this class represent elements of the field GF(2**256 - 2**32 - 977).
|
||||
@@ -40,7 +41,7 @@ class FE:
|
||||
num = (num * b._den) % FE.SIZE
|
||||
else:
|
||||
den = (den * b) % FE.SIZE
|
||||
assert den != 0
|
||||
assert_not_equal(den, 0)
|
||||
if num == 0:
|
||||
den = 1
|
||||
self._num = num
|
||||
|
||||
Reference in New Issue
Block a user