Your message dated Wed, 25 Nov 2015 19:40:40 +0000
with message-id <[email protected]>
and subject line My error
has caused the Debian Bug report #802677,
regarding AttributeError: 'IntegrityError' object has no attribute 
'__traceback__'
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
802677: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802677
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python-testtools
Version: 1.8.0-3
Severity: important

python-testtools introduces a bug which causes the failure of all django unit 
tests
for my package. The full traceback is:

Traceback (most recent call last):
  File "./lava_server/manage.py", line 137, in <module>
    legacy_main()
  File "./lava_server/manage.py", line 133, in legacy_main
    execute_from_command_line(sys.argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 385, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/usr/lib/python2.7/dist-packages/django/core/management/commands/test.py", 
line 50, in run_from_argv
    super(Command, self).run_from_argv(argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 
288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File 
"/usr/lib/python2.7/dist-packages/django/core/management/commands/test.py", 
line 71, in execute
    super(Command, self).execute(*args, **options)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 
338, in execute
    output = self.handle(*args, **options)
  File 
"/usr/lib/python2.7/dist-packages/django/core/management/commands/test.py", 
line 88, in handle
    failures = test_runner.run_tests(test_labels)
  File "/usr/lib/python2.7/dist-packages/django/test/runner.py", line 148, in 
run_tests
    result = self.run_suite(suite)
  File "/usr/lib/python2.7/dist-packages/django/test/runner.py", line 115, in 
run_suite
    ).run(suite)
  File "/usr/lib/python2.7/unittest/runner.py", line 151, in run
    test(result)
  File "/usr/lib/python2.7/unittest/suite.py", line 70, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python2.7/unittest/suite.py", line 108, in run
    test(result)
  File "/usr/lib/python2.7/dist-packages/unittest2/case.py", line 673, in 
__call__
    return self.run(*args, **kwds)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 606, in 
run
    return run_test.run(result)
  File "/usr/lib/python2.7/dist-packages/testtools/runtest.py", line 80, in run
    return self._run_one(actual_result)
  File "/usr/lib/python2.7/dist-packages/testtools/runtest.py", line 94, in 
_run_one
    return self._run_prepared_result(ExtendedToOriginalDecorator(result))
  File "/usr/lib/python2.7/dist-packages/testtools/runtest.py", line 108, in 
_run_prepared_result
    self._run_core()
  File "/usr/lib/python2.7/dist-packages/testtools/runtest.py", line 144, in 
_run_core
    self.case._run_test_method, self.result):
  File "/usr/lib/python2.7/dist-packages/testtools/runtest.py", line 193, in 
_run_user
    return self._got_user_exception(sys.exc_info())
  File "/usr/lib/python2.7/dist-packages/testtools/runtest.py", line 213, in 
_got_user_exception
    self.case.onException(exc_info, tb_label=tb_label)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 556, in 
onException
    self._report_traceback(exc_info, tb_label=tb_label)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 592, in 
_report_traceback
    self, '__testtools_tb_locals__', False)))
  File "/usr/lib/python2.7/dist-packages/testtools/content.py", line 205, in 
__init__
    limit=limit, capture_locals=capture_locals).format())
  File "/usr/lib/python2.7/dist-packages/traceback2/__init__.py", line 449, in 
__init__
    exc_value.__cause__.__traceback__,
AttributeError: 'IntegrityError' object has no attribute '__traceback__'

Downgrading python-testtools to 0.9.39-2 - with no other changes - completely 
fixes the problem.

This happens with all calls to the django unit tests using manage.py test.

ii  python-django                 1.7.10-1  

To reproduce, it is necessary to install lava-server, so a Stretch VM is 
recommended.
This provides the django environment and migrations:

$ echo "Accept defaults for debconf prompts"
$ sudo apt -y install lava-server lava-dev
$ git clone http://git.linaro.org/lava/lava-server.git
$ cd lava-server
$ git checkout release
$ ./ci-run -v2

To call unit tests individually, use:
$ ./lava_server/manage.py test <app_name>

where <app_name> is one of dashboard_app, lava_scheduler_app, 
lava_scheduler_daemon or lava_results_app.

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armhf, arm64

Kernel: Linux 4.1.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python-testtools depends on:
ii  python                2.7.9-1
ii  python-extras         0.0.3-3
ii  python-mimeparse      0.1.4-1
ii  python-pkg-resources  18.4-1

Versions of packages python-testtools recommends:
ii  python-fixtures  1.3.1-2

Versions of packages python-testtools suggests:
pn  python-testtools-doc  <none>
ii  python-twisted        15.2.1-1

-- no debconf information

--- End Message ---
--- Begin Message ---
Version: 1.8.7-2

I was hasty and thought that 1.8.7-1 was the proposed fix.

I installed 1.8.7-2 from incoming.debian.org and 1.8.7-2 is much better
- as I suspected, there are failures in the unit tests which were being
hidden by this bug. Likely due to the long history of the codebase
where some of the transaction handling code dates from the days of
django1.2. This is where the new unit test failures are happening.

Thanks for this fix. It is python-testtools which is revealing these
unit test failures but I can now identify the fixes I need.

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

Attachment: pgpYI4LzWkZgR.pgp
Description: OpenPGP digital signature


--- End Message ---
_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team

Reply via email to