开发者

Pyunit: "Import Site"

开发者 https://www.devze.com 2022-12-21 04:47 出处:网络
Using pyUnit to do what is currently a very small and simple unit test I am getting the message: \'import site\' failed; use -v for traceback

Using pyUnit to do what is currently a very small and simple unit test I am getting the message:

'import site' failed; use -v for traceback
...
____________________________________________
Ran 3 tests in 0.094S

When I rerun the unit test with the -v parameter, it returns verbose information about each of the 3 tests and has no error or failure messages.

What does this m开发者_开发问答essage mean?


The first thing to know is that the message you're seeing is from the Python interpreter, and has nothing to do with pyUnit. The -v in the message refers to "python -v".

As to why you can't import site, and why running pyUnit with -v makes the error go away, I don't know. Do you have your own site.py?

0

精彩评论

暂无评论...
验证码 换一张
取 消