I ran a build last night, successfully. I got up this morning and ran another without changing any configuration or modifying any source code. Now my build is failing with the message "No source for code" when running my nosetests with coverage.
NoSource: No source for code: '/home/matthew/.hudson/jobs/myproject/workspace/tests/unit/util.py' . . . No source for code: '/home/matthew/.hudson/jobs/myproject/workspace/__init__.py'
The only clue I have is that the files it says it can't find aren't there, but they never were and they're not supposed to be. For example, in the latter, Hudson's workspace isn't a Python module, so __init__.py
wouldn't be there.
Update: I've confirmed that this isn't a Hudson issue. When I run nostests with coverage in the directory itself, I see similar messages. Again, the files that coverage is looking for were never there to begin with, making this very puzzling.
I'm not sure why it thinks that file exists, but you can tell coverage.py to ignore these problems with a coverage xml -i
switch.
If you want to track down the error, drop me a line (ned at ned batchelder com).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With