diff options
Diffstat (limited to 'tests/test_rand.py')
-rw-r--r-- | tests/test_rand.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_rand.py b/tests/test_rand.py index bdd3af0..41a4f27 100644 --- a/tests/test_rand.py +++ b/tests/test_rand.py @@ -32,11 +32,11 @@ class TestRand(object): def test_insufficient_memory(self): """ - `OpenSSL.rand.bytes` raises `MemoryError` if more bytes are requested - than will fit in memory. + `OpenSSL.rand.bytes` raises `MemoryError` or `OverflowError` if more + bytes are requested than will fit in memory. """ - with pytest.raises(MemoryError): - rand.bytes(sys.maxsize) + with pytest.raises((MemoryError, OverflowError)): + rand.bytes(sys.maxsize + 1) def test_bytes(self): """ |