Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
136 views
in Technique[技术] by (71.8m points)

python - Nose unable to find tests in ubuntu

Is there any reason why Nose wouldn't be able to find tests in Ubuntu 9.04?

I'm using nose 0.11.1 with python 2.5.4.
I can run tests only if I explicitly specify the filename. If I don't specify the filename it just says, 0 tests.

The same project runs tests fine on my Mac, so I'm quite stumped!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The other thing which always gets me with nose is that it won't run tests in executable files. I'm not exactly sure why that would make a difference across Mac/Ubuntu, but it's worth a shot.

Make sure that the scripts didn't somehow get chmod +x'd on the Mac… And if they did, fix them with chmod -x $(find tests/ -name '*.py').


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...