Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#31001 closed Bug (duplicate)

Test failures on SQLite 3.30.

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

Description

I'm encountering the following test failures in the Django test suite on SQLite 3.30.0+:

======================================================================
FAIL: test_explicit_ForeignKey (nested_foreign_keys.tests.DeeplyNestedForeignKeysTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../django/tests/nested_foreign_keys/tests.py", line 176, in test_explicit_ForeignKey
    self.assertEqual(Package.objects.exclude(screening__movie__director=self.director).count(), 1)
AssertionError: 0 != 1

======================================================================
FAIL: test_inheritance (nested_foreign_keys.tests.DeeplyNestedForeignKeysTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../django/tests/nested_foreign_keys/tests.py", line 153, in test_inheritance
    self.assertEqual(Event.objects.exclude(screening__movie__director=self.director).count(), 1)
AssertionError: 0 != 1

======================================================================
FAIL: test_explicit_ForeignKey (nested_foreign_keys.tests.NestedForeignKeysTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../django/tests/nested_foreign_keys/tests.py", line 100, in test_explicit_ForeignKey
    self.assertEqual(Package.objects.exclude(screening__movie=self.movie).count(), 1)
AssertionError: 0 != 1

======================================================================
FAIL: test_explicit_ForeignKey_NullFK (nested_foreign_keys.tests.NestedForeignKeysTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../django/tests/nested_foreign_keys/tests.py", line 121, in test_explicit_ForeignKey_NullFK
    self.assertEqual(PackageNullFK.objects.exclude(screening__movie=self.movie).count(), 2)
AssertionError: 1 != 2

======================================================================
FAIL: test_inheritance (nested_foreign_keys.tests.NestedForeignKeysTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../django/tests/nested_foreign_keys/tests.py", line 53, in test_inheritance
    self.assertEqual(Event.objects.exclude(screening__movie=self.movie).count(), 1)
AssertionError: 0 != 1

======================================================================
FAIL: test_inheritance_null_FK (nested_foreign_keys.tests.NestedForeignKeysTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../django/tests/nested_foreign_keys/tests.py", line 72, in test_inheritance_null_FK
    self.assertEqual(Event.objects.exclude(screeningnullfk__movie=self.movie).count(), 2)
AssertionError: 1 != 2

======================================================================
FAIL: test_ticket7076 (queries.tests.Queries1Tests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../django/tests/queries/tests.py", line 806, in test_ticket7076
    ['<Tag: t1>', '<Tag: t4>', '<Tag: t5>']
  File ".../django/django/test/testcases.py", line 1043, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: ['<Tag: t4>', '<Tag: t5>'] != ['<Tag: t1>', '<Tag: t4>', '<Tag: t5>']

First differing element 0:
'<Tag: t4>'
'<Tag: t1>'

Second list contains 1 additional elements.
First extra element 2:
'<Tag: t5>'

- ['<Tag: t4>', '<Tag: t5>']
?          ^

+ ['<Tag: t1>', '<Tag: t4>', '<Tag: t5>']
?          ^           +++++++++++++

I haven't managed to identify the cause yet. It is likely that a bug needs to be filed for SQLite, but we may need to workaround it in Django.

Change History (3)

comment:1 by Mariusz Felisiak, 5 years ago

Resolution: duplicate
Status: newclosed
Summary: Test failures on SQLite 3.30.0+Test failures on SQLite 3.30.0.

Duplicate of #30879.

comment:2 by Mariusz Felisiak, 5 years ago

Summary: Test failures on SQLite 3.30.0.Test failures on SQLite 3.30.

comment:3 by Nick Pope, 5 years ago

Ah, sorry for the duplicate.

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