Question

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 message mean?

Was it helpful?

Solution

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?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top