Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#16466 closed Bug (needsinfo)

Similar to ticket 16250, _destroy_test_db calls self.set_autocommit() — at Version 1

Reported by: ryazwinski Owned by: nobody
Component: Database layer (models, ORM) Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Aymeric Augustin)

Destroying test database for alias 'default'...
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings) 
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.p
y", line 438, in execute_manager
    utility.execute()
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/commands/test.py", line 37, in handle
    failures = test_runner.run_tests(test_labels)
  File "/usr/local/lib/python2.6/dist-packages/django/test/simple.py", line 361, in run_tests
    self.teardown_databases(old_config)
  File "/usr/local/lib/python2.6/dist-packages/django/test/simple.py", line 327, in teardown_databases
    connection.creation.destroy_test_db(old_name, self.verbosity)
  File "/usr/local/lib/python2.6/dist-packages/django/db/backends/creation.py", line 452, in destroy_test_db
    self._destroy_test_db(test_database_name, verbosity)
  File "/usr/local/lib/python2.6/dist-packages/django/db/backends/creation.py", line 461, in _destroy_test_db
    self.set_autocommit()
  File "/usr/local/lib/python2.6/dist-packages/django/db/backends/creation.py", line 472, in set_autocommit
    self.connection.connection.autocommit = True
psycopg2.ProgrammingError: autocommit cannot be used inside a transaction

Change History (1)

comment:1 by Aymeric Augustin, 13 years ago

Description: modified (diff)
Resolution: needsinfo
Status: newclosed

How is this different from #16250? Doesn't r16520 fix the issue?

NB: edited description to fix formatting.

Note: See TracTickets for help on using tickets.
Back to Top