Skip to content

Commit d009511

Browse files
committed
fix imports so unit tests work from root and library dir
1 parent 4c3cad5 commit d009511

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lambda_multiprocessing/test_main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import boto3
1111
from moto import mock_aws
12-
from timeout import TimeoutManager, TestTimeoutException
12+
from lambda_multiprocessing.timeout import TimeoutManager, TestTimeoutException
1313

1414
# add an overhead for duration when asserting the duration of child processes
1515
# if other processes are hogging CPU, make this bigger
@@ -39,7 +39,7 @@ def return_with_sleep(x, delay=0.3):
3939

4040
def _raise(ex: Optional[Exception]):
4141
if ex:
42-
raise ex
42+
raise exfrom .timeout
4343

4444
class ExceptionA(Exception):
4545
pass
@@ -73,7 +73,7 @@ def tearDown(self):
7373
# For a potential eternal task, use timeout.TimeoutManager
7474
def assertDuration(self, min_t=None, max_t=None):
7575
class AssertDuration:
76-
def __init__(self, test):
76+
def __init__(self, test: unittest.TestCase):
7777
self.test = test
7878
def __enter__(self):
7979
self.start_t = time()

0 commit comments

Comments
 (0)