How do I get error messages from nosetests

162 Views Asked by At

The nosetest command is failing with no messages. If I cd to my home directory I get the message I would expect:

(base) raysalemi@RayProMac ~ % nosetests

----------------------------------------------------------------------
Ran 0 tests in 0.003s

OK

But if I cd to my tests directory I get this:

/Users/raysalemi/repos/pyuvm/tests/nosetests
(base) raysalemi@RayProMac nosetests % ls
__pycache__         pyuvm_unittest.py       test_05_base_classes.py     test_06_reporting_classes.py
(base) raysalemi@RayProMac nosetests % nosetests
(base) raysalemi@RayProMac nosetests % echo $?
1

This has been running for months so I'm not certain of the change, but I can't get an error message to check, only the exit status.

Suggestions?

1

There are 1 best solutions below

0
Ray Salemi On

The solution was to CD to my test directory and run python with the unittest module on the same command line:

(base) raysalemi@RayProMac nosetests % python -m unittest

No module named 'copyz'
No module named 'copyz'
EE

I had accidentally stuck a z into my code and the import was failing. The only way to get that message was to use unittest directly.