Remove duplicated DMatrix. (#6592)

This commit is contained in:
Jiaming Yuan
2021-01-12 09:36:56 +08:00
committed by GitHub
parent c709f2aaaf
commit 03cd087da1
2 changed files with 6 additions and 8 deletions

View File

@@ -112,8 +112,12 @@ class TestRanking:
Cleanup test artifacts from download and unpacking
:return:
"""
os.remove(cls.dpath + "MQ2008.zip")
shutil.rmtree(cls.dpath + "MQ2008")
zip_f = cls.dpath + "MQ2008.zip"
if os.path.exists(zip_f):
os.remove(zip_f)
directory = cls.dpath + "MQ2008"
if os.path.exists(directory):
shutil.rmtree(directory)
def test_training(self):
"""