Fix a unit test on CLI, to handle RC versions

This commit is contained in:
Hyunsu Cho 2020-08-02 08:56:15 +00:00
parent 71197d1dfa
commit 9116a0ec10

View File

@ -121,6 +121,8 @@ eval[test] = {data_path}
v = xgboost.__version__ v = xgboost.__version__
if v.find('SNAPSHOT') != -1: if v.find('SNAPSHOT') != -1:
assert msg.split(':')[1].strip() == v.split('-')[0] assert msg.split(':')[1].strip() == v.split('-')[0]
elif v.find('rc') != -1:
assert msg.split(':')[1].strip() == v.split('rc')[0]
else: else:
assert msg.split(':')[1].strip() == v assert msg.split(':')[1].strip() == v