"git@developer.sourcefind.cn:tianlh/lightgbm-dcu.git" did not exist on "8415924c8fac4c1192cad209e38193ad0059e0d3"
Unverified Commit f2695dab authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

completely remove tempfile from test_basic (#3767)

parent f6d2dce4
# coding: utf-8
import os
import tempfile
import lightgbm as lgb
import numpy as np
......@@ -268,8 +267,7 @@ def test_cegb_affects_behavior(tmp_path):
base = lgb.Booster(train_set=ds)
for k in range(10):
base.update()
with tempfile.NamedTemporaryFile() as f:
basename = f.name
basename = str(tmp_path / "basename.txt")
base.save_model(basename)
with open(basename, 'rt') as f:
basetxt = f.read()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment