kmmbvnr / django-jenkins

Plug and play continuous integration with django and jenkins
GNU Lesser General Public License v3.0
945 stars 279 forks source link

Coverage v5.0 breaks django-jenkins #374

Open matthew-hodgins opened 4 years ago

matthew-hodgins commented 4 years ago

The coverage module recently released v5 and since then, django-jenkins seems broken:

Storing coverage info...
Traceback (most recent call last):
  File "/.../local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/.../local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/.../local/lib/python2.7/site-packages/django_jenkins-0.110.0-py2.7.egg/django_jenkins/management/commands/jenkins.py", line 47, in run_from_argv
    super(Command, self).run_from_argv(argv)
  File "/.../local/lib/python2.7/site-packages/django/core/management/commands/test.py", line 29, in run_from_argv
    super(Command, self).run_from_argv(argv)
  File "/.../ocal/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/.../local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/.../local/lib/python2.7/site-packages/django_jenkins-0.110.0-py2.7.egg/django_jenkins/management/commands/jenkins.py", line 116, in handle
    coverage.save(tested_locations, options)
  File "/.../local/lib/python2.7/site-packages/django_jenkins-0.110.0-py2.7.egg/django_jenkins/tasks/with_coverage.py", line 29, in save
    self.coverage.stop()
  File "/.../local/lib/python2.7/site-packages/django_jenkins-0.110.0-py2.7.egg/django_jenkins/tasks/with_coverage.py", line 55, in get_morfs
    return [filename for filename in coverage.data.measured_files()
AttributeError: 'Coverage' object has no attribute 'data'
matthew-hodgins commented 4 years ago

I tested locally by calling coverage.get_data() instead of coverage.data and it worked properly.

ardalanrazavi commented 4 years ago

Any update on this issue?