Skip to content

Commit dea4c13

Browse files
committed
fix pytest error
1 parent b2cafd3 commit dea4c13

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/test_qlib_from_source_slow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@ jobs:
6969
max_attempts: 3
7070
command: |
7171
cd tests
72-
python -m pytest . -m "slow" --durations=0
72+
python -m pytest -s . -m "slow" --durations=0

tests/data_mid_layer_tests/test_dataloader.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@
1111
from qlib.data.dataset.handler import DataHandlerLP
1212
from qlib.contrib.data.loader import Alpha158DL, Alpha360DL
1313
from qlib.data import D
14+
import logging
15+
16+
logging.basicConfig(level=logging.INFO)
1417

1518

1619
class TestDataLoader(unittest.TestCase):
1720

1821
def test_nested_data_loader(self):
19-
qlib.init()
22+
print("debug info\n")
23+
qlib.init(kernels=1)
2024
nd = NestedDataLoader(
2125
dataloader_l=[
2226
{
@@ -30,7 +34,7 @@ def test_nested_data_loader(self):
3034
)
3135
# Of course you can use StaticDataLoader
3236

33-
dataset = nd.load()
37+
dataset = nd.load(start_time="2020-01-01", end_time="2020-01-31")
3438

3539
assert dataset is not None
3640

0 commit comments

Comments
 (0)