Skip to content

Commit

Permalink
Fixed GitHub packaging action.
Browse files Browse the repository at this point in the history
* Fixed intermittently failing unit test
* Excluded python 3.9 build for macOS.
  • Loading branch information
mliberty1 committed May 8, 2024
1 parent 824d6f1 commit 6a5e975
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ jobs:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
python_version: ["cp39", "cp310", "cp311", "cp312"]
exclude:
- os: "macos-latest"
python_version: "cp39"

steps:
- name: Download sdist
Expand Down
4 changes: 2 additions & 2 deletions test/test_monocypher.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def test_IncrementalAuthenticatedEncryption(self):

def test_sign(self):
random = np.random.RandomState(seed=1)
for i in range(10):
for i in range(100):
length = random.randint(1, 4096)
secret_key, expected_public_key = monocypher.generate_signing_key_pair()
msg = bytes(random.randint(0, 256, length, dtype=np.uint8))
Expand All @@ -111,7 +111,7 @@ def test_sign(self):
sig = monocypher.signature_sign(secret_key, msg)
self.assertTrue(monocypher.signature_check(sig, public_key, msg))
self.assertFalse(monocypher.signature_check(sig, public_key, msg + b'0'))
sig2 = sig[:10] + bytes([sig[10] + 1]) + sig[11:]
sig2 = sig[:10] + bytes([(sig[10] + 1) & 0xff]) + sig[11:]
self.assertFalse(monocypher.signature_check(sig2, public_key, msg))

def test_key_exchange_static(self):
Expand Down

0 comments on commit 6a5e975

Please sign in to comment.