Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python: use pytest for tests #498

Merged
merged 1 commit into from
May 11, 2017
Merged

Conversation

henry0312
Copy link
Contributor

https://docs.pytest.org/

This is the first commit of #261.
(I'm very sorry for too late starting)

I swithed nose to pytest (cf. #483).

@wylqq312715289
Copy link

import lightgbm as lgb
dtest = lgb.Dataset('./data/libsvm.txt')
print dtest.num_feature()
======================= why error ================================
File "*******/basic.py", line 1158, in num_feature
raise LightGBMError("Cannot get num_feature before construct dataset")
lightgbm.basic.LightGBMError: Cannot get num_feature before construct dataset
===========================?=======================================
libsvm.txt like that:
1 0:0.4252040763188015 1:0.7234269439819614 2:0.2198664831534287
1 0:0.7855499009996039 1:0.2287907401631696 2:0.3954096899617033
0 0:0.8977085012657007 1:0.002568578519813736 2:0.7981754619557275
1 0:0.7754389449922868 1:0.3873931079206858 2:0.8511552221119321
1 0:0.9060812199464807 1:0.5049698598167162 2:0.3665523656418372
1 0:0.7289170144780479 1:0.6992288710470674 2:0.3380542718713656
1 0:0.02080155085980295 1:0.6404016217285756 2:0.4987680927973108
1 0:0.19294150321891 1:0.3788979348122099 2:0.2526684496343294
0 0:0.7324288183843998 1:0.8110061405511925 2:0.6875312345800412
0 0:0.6657764530014816 1:0.8326680735896242 2:0.7874407980610832

@henry0312
Copy link
Contributor Author

@wylqq312715289 what is this?

@guolinke
Copy link
Collaborator

guolinke commented May 9, 2017

@wxchan can you help to review this ?

@guolinke guolinke merged commit babf01c into microsoft:master May 11, 2017
@henry0312 henry0312 deleted the use_pytest branch May 11, 2017 05:29
@henry0312
Copy link
Contributor Author

I guess he may be busy 🤔

@guolinke
Copy link
Collaborator

@henry0312 I take a look and think it is okay to merge first. 😄

@lock lock bot locked as resolved and limited conversation to collaborators Mar 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants