[TIP] Error using Ned's coverage in Hudson matrix build job

Olemis Lang olemis at gmail.com
Mon Sep 20 14:24:14 PDT 2010

Hi !

I use Ned's coverage 3.3.1 in a Hudson matrix job . The target command
in the build step initially looked like this


$WORKSPACE/venv/$BUILD_NUMBER/bin/python$PYTHON setup.py test -r


and unittests worked just fine . I upgraded it and now it looks like this


$WORKSPACE/venv/$BUILD_NUMBER/bin/coverage run
$WORKSPACE/venv/$BUILD_NUMBER/bin/python$PYTHON setup.py test -r
$WORKSPACE/venv/$BUILD_NUMBER/bin/coverage xml


Now I get this error ...


Traceback (most recent call last):
  File "/var/lib/hudson/jobs/tracrpc-mq/workspace/PYTHON/2.6/TRAC/0.11.7/venv/48/bin/coverage",
line 8, in <module>
    load_entry_point('coverage==3.3.1', 'console_scripts', 'coverage')()
  File "/home/olemis/temp/coverage-3.3.1/coverage/cmdline.py", line 601, in main
    status = CoverageScript().command_line(argv)
  File "/home/olemis/temp/coverage-3.3.1/coverage/cmdline.py", line
479, in command_line
    self.run_python_file(args[0], args)
  File "/home/olemis/temp/coverage-3.3.1/coverage/execfile.py", line
49, in run_python_file
    code = compile(source, filename, "exec")
TypeError: compile() expected string without null bytes


  - Does anybody know what might be wrong ?

Any help will be appreciated . Thnx in advance !



Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/

Featured article:

More information about the testing-in-python mailing list