mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-21 16:05:02 +02:00
Only import resource module when actually running the test instead of at import time
This commit is contained in:
@@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import unittest
|
|
||||||
|
|
||||||
from . import BaseTest
|
from . import BaseTest
|
||||||
|
|
||||||
@@ -23,8 +22,9 @@ def is_rlimit_memlock_too_low() -> bool:
|
|||||||
|
|
||||||
class TestCrypto(BaseTest):
|
class TestCrypto(BaseTest):
|
||||||
|
|
||||||
@unittest.skipIf(is_rlimit_memlock_too_low(), 'RLIMIT_MEMLOCK is too low')
|
|
||||||
def test_elliptic_curve_data_exchange(self):
|
def test_elliptic_curve_data_exchange(self):
|
||||||
|
if is_rlimit_memlock_too_low():
|
||||||
|
self.skipTest('RLIMIT_MEMLOCK is too low')
|
||||||
from kitty.fast_data_types import AES256GCMDecrypt, AES256GCMEncrypt, CryptoError, EllipticCurveKey
|
from kitty.fast_data_types import AES256GCMDecrypt, AES256GCMEncrypt, CryptoError, EllipticCurveKey
|
||||||
alice = EllipticCurveKey()
|
alice = EllipticCurveKey()
|
||||||
bob = EllipticCurveKey()
|
bob = EllipticCurveKey()
|
||||||
|
|||||||
Reference in New Issue
Block a user