AssertionError with python2.6.9 on Travis

Issue #327 wontfix
Mike Bryant
created an issue

Coverage files with this traceback on python 2.6.9 on Travis.

Traceback (most recent call last):

File "/home/travis/virtualenv/python2.6.9/bin/coverage", line 9, in <module>

load_entry_point('coverage==3.7.1', 'console_scripts', 'coverage')()

File "/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages/coverage/cmdline.py", line 721, in main

status = CoverageScript().command_line(argv)

File "/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages/coverage/cmdline.py", line 438, in command_line

self.do_execute(options, args)

File "/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages/coverage/cmdline.py", line 580, in do_execute

self.coverage.stop()

File "/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages/coverage/control.py", line 410, in stop

self.collector.stop()

File "/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages/coverage/collector.py", line 294, in stop

assert self._collectors[-1] is self

AssertionError

e.g. here: https://travis-ci.org/mikebryant/django-autoconfig/jobs/37549854

The same job builds fine on other versions of python.

Comments (3)

  1. Mike Bryant reporter

    I've done some more investigation, it looks like a problem with the interaction between django-setuptest running coverage as well, smoething to do with the way they're nested.

    I've resolved this for my use case by removing the extra one, since django-setuptest is taking care of it.

    Not sure if there's a bug or not. Here's my debug log:

    /tmp/blah/django-autoconfig$ coverage run --source=django_autoconfig setup.py test                    
    Starting: [] <Collector at 0x21b2110>
    Started: [<Collector at 0x21b2110>] <Collector at 0x21b2110>
      File "/tmp/blah/bin/coverage", line 9, in <module>
        load_entry_point('coverage==3.7.1', 'console_scripts', 'coverage')()
      File "/tmp/blah/lib/python2.6/site-packages/coverage/cmdline.py", line 721, in main
        status = CoverageScript().command_line(argv)
      File "/tmp/blah/lib/python2.6/site-packages/coverage/cmdline.py", line 438, in command_line
        self.do_execute(options, args)
      File "/tmp/blah/lib/python2.6/site-packages/coverage/cmdline.py", line 565, in do_execute
        self.coverage.start()
      File "/tmp/blah/lib/python2.6/site-packages/coverage/control.py", line 403, in start
        self.collector.start()
      File "/tmp/blah/lib/python2.6/site-packages/coverage/collector.py", line 266, in start
        traceback.print_stack()
    running test
    Checking .pth file support in .
    /tmp/blah/bin/python -E -c pass
    Searching for django-setuptest
    Best match: django-setuptest 0.1.5
    Processing django_setuptest-0.1.5-py2.6.egg
    
    Using /tmp/blah/django-autoconfig/django_setuptest-0.1.5-py2.6.egg
    Searching for six
    Best match: six 1.8.0
    Processing six-1.8.0-py2.6.egg
    
    Using /tmp/blah/django-autoconfig/six-1.8.0-py2.6.egg
    Searching for pep8
    Best match: pep8 1.5.7
    Processing pep8-1.5.7-py2.6.egg
    Using /tmp/blah/django-autoconfig/pep8-1.5.7-py2.6.egg
    running egg_info
    writing requirements to django_autoconfig.egg-info/requires.txt
    writing django_autoconfig.egg-info/PKG-INFO
    writing top-level names to django_autoconfig.egg-info/top_level.txt
    writing dependency_links to django_autoconfig.egg-info/dependency_links.txt
    reading manifest file 'django_autoconfig.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching '*.py' under directory 'tests'
    writing manifest file 'django_autoconfig.egg-info/SOURCES.txt'
    running build_ext
    Starting: [<Collector at 0x21b2110>] <Collector at 0x2598850>
    Started: [<Collector at 0x21b2110>, <Collector at 0x2598850>] <Collector at 0x2598850>
      File "/tmp/blah/bin/coverage", line 9, in <module>
        load_entry_point('coverage==3.7.1', 'console_scripts', 'coverage')()
      File "/tmp/blah/lib/python2.6/site-packages/coverage/cmdline.py", line 721, in main
        status = CoverageScript().command_line(argv)
      File "/tmp/blah/lib/python2.6/site-packages/coverage/cmdline.py", line 438, in command_line
        self.do_execute(options, args)
      File "/tmp/blah/lib/python2.6/site-packages/coverage/cmdline.py", line 575, in do_execute
        self.run_python_file(filename, args)
      File "/tmp/blah/lib/python2.6/site-packages/coverage/execfile.py", line 104, in run_python_file
        exec_code_object(code, main_mod.__dict__)
      File "<exec_function>", line 2, in exec_code_object
      File "setup.py", line 36, in <module>
        'Programming Language :: Python :: 3.3',
      File "/usr/lib/python2.6/distutils/core.py", line 152, in setup
        dist.run_commands()
      File "/usr/lib/python2.6/distutils/dist.py", line 975, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
        cmd_obj.run()
      File "/tmp/blah/lib/python2.6/site-packages/distribute-0.6.24-py2.6.egg/setuptools/command/test.py", line 137, in run
        self.with_project_on_sys_path(self.run_tests)
      File "/tmp/blah/lib/python2.6/site-packages/distribute-0.6.24-py2.6.egg/setuptools/command/test.py", line 117, in wit
    h_project_on_sys_path
        func()
      File "/tmp/blah/lib/python2.6/site-packages/distribute-0.6.24-py2.6.egg/setuptools/command/test.py", line 146, in run
    _tests
        testLoader = loader_class()
      File "/usr/lib/python2.6/unittest.py", line 816, in __init__
        self.parseArgs(argv)
      File "/usr/lib/python2.6/unittest.py", line 843, in parseArgs
        self.createTests()
      File "/usr/lib/python2.6/unittest.py", line 849, in createTests
        self.module)
      File "/usr/lib/python2.6/unittest.py", line 613, in loadTestsFromNames
        suites = [self.loadTestsFromName(name, module) for name in names]
      File "/usr/lib/python2.6/unittest.py", line 598, in loadTestsFromName
        test = obj()
      File "/tmp/blah/django-autoconfig/django_setuptest-0.1.5-py2.6.egg/setuptest/setuptest.py", line 25, in __init__
        self.cov.start()
      File "/tmp/blah/lib/python2.6/site-packages/coverage/control.py", line 403, in start
        self.collector.start()
      File "/tmp/blah/lib/python2.6/site-packages/coverage/collector.py", line 266, in start
        traceback.print_stack()
    Stopping: [<Collector at 0x21b2110>, <Collector at 0x2598850>] <Collector at 0x21b2110>
      File "/tmp/blah/bin/coverage", line 9, in <module>
        load_entry_point('coverage==3.7.1', 'console_scripts', 'coverage')()
      File "/tmp/blah/lib/python2.6/site-packages/coverage/cmdline.py", line 721, in main
        status = CoverageScript().command_line(argv)
      File "/tmp/blah/lib/python2.6/site-packages/coverage/cmdline.py", line 438, in command_line
        self.do_execute(options, args)
      File "/tmp/blah/lib/python2.6/site-packages/coverage/cmdline.py", line 580, in do_execute
        self.coverage.stop()
      File "/tmp/blah/lib/python2.6/site-packages/coverage/control.py", line 410, in stop
        self.collector.stop()
      File "/tmp/blah/lib/python2.6/site-packages/coverage/collector.py", line 297, in stop
        traceback.print_stack()
    Traceback (most recent call last):
      File "/tmp/blah/bin/coverage", line 9, in <module>
        load_entry_point('coverage==3.7.1', 'console_scripts', 'coverage')()
      File "/tmp/blah/lib/python2.6/site-packages/coverage/cmdline.py", line 721, in main
        status = CoverageScript().command_line(argv)
      File "/tmp/blah/lib/python2.6/site-packages/coverage/cmdline.py", line 438, in command_line
        self.do_execute(options, args)
      File "/tmp/blah/lib/python2.6/site-packages/coverage/cmdline.py", line 580, in do_execute
        self.coverage.stop()
      File "/tmp/blah/lib/python2.6/site-packages/coverage/control.py", line 410, in stop
        self.collector.stop()
      File "/tmp/blah/lib/python2.6/site-packages/coverage/collector.py", line 299, in stop
        assert self._collectors[-1] is self
    AssertionError
    Stopping: [<Collector at 0x21b2110>, <Collector at 0x2598850>] <Collector at 0x2598850>
      File "/usr/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
        func(*targs, **kargs)
      File "/tmp/blah/lib/python2.6/site-packages/coverage/control.py", line 415, in _atexit
        self.stop()
      File "/tmp/blah/lib/python2.6/site-packages/coverage/control.py", line 410, in stop
        self.collector.stop()
      File "/tmp/blah/lib/python2.6/site-packages/coverage/collector.py", line 297, in stop
        traceback.print_stack()
    
  2. Log in to comment