diff --git a/.coveragerc b/.coveragerc index 7145fa38..17b1266a 100644 --- a/.coveragerc +++ b/.coveragerc @@ -5,8 +5,8 @@ omit = *import_database.py *mnemonic_key_create.py *sign_raw.py + *benchmark.py *wallet_multisig_2of3.py - *dashd.py *bitcoind.py *dogecoind.py *bcoin.py @@ -15,9 +15,9 @@ omit = *cryptoid.py *chainso.py *litecoreio.py - *insightdash.py *litecoinblockexplorer.py *bitflyer.py + *blocksmurfer.py [report] exclude_lines = pragma: no cover @@ -29,3 +29,4 @@ exclude_lines = if 0: if __name__ == .__main__.: if not PY3 + except ImportError diff --git a/tests/test_encoding.py b/tests/test_encoding.py index 4b24f170..a29462a3 100644 --- a/tests/test_encoding.py +++ b/tests/test_encoding.py @@ -432,6 +432,15 @@ def test_encryption_aes(self): quote = aes_decrypt(encrypted_data, key) self.assertEqual(data, quote) +class TestEncodingCrypto(unittest.TestCase): + + def test_sha256(self): + + self.assertEqual(sha256(b'a' * 1000000).hex(), + 'cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0') + self.assertEqual(sha256(b'a' * 1000000, as_hex=True), + 'cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0') + if __name__ == '__main__': unittest.main()