Pyunit: "Import Site"
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?
精彩评论