11import time
2- import numpy
32import pytest
43from src .thread import ParallelProcessing , exceptions
54
@@ -19,7 +18,7 @@ def _dummy_raiseException(x: Exception, delay: float = 0):
1918# >>>>>>>>>> General Use <<<<<<<<<< #
2019def test_threadsScaleDown ():
2120 """This test is for testing if threads scale down `max_threads` when the dataset is lesser than the thread count"""
22- dataset = numpy . arange ( 0 , 2 ). tolist ( )
21+ dataset = list ( range ( 0 , 2 ))
2322 new = ParallelProcessing (
2423 function = _dummy_dataProcessor ,
2524 dataset = dataset ,
@@ -32,7 +31,7 @@ def test_threadsScaleDown():
3231
3332def test_threadsProcessing ():
3433 """This test is for testing if threads correctly order data in the `dataset` arrangement"""
35- dataset = numpy . arange ( 0 , 500 ). tolist ( )
34+ dataset = list ( range ( 0 , 500 ))
3635 new = ParallelProcessing (
3736 function = _dummy_dataProcessor ,
3837 dataset = dataset ,
@@ -48,7 +47,7 @@ def test_threadsProcessing():
4847# >>>>>>>>>> Raising Exceptions <<<<<<<<<< #
4948def test_raises_StillRunningError ():
5049 """This test should raise ThreadStillRunningError"""
51- dataset = numpy . arange ( 0 , 8 ). tolist ( )
50+ dataset = list ( range ( 0 , 8 ))
5251 new = ParallelProcessing (
5352 function = _dummy_dataProcessor ,
5453 dataset = dataset ,
0 commit comments