Opened 5 years ago
Last modified 5 years ago
#31601 closed Cleanup/optimization
Test suite fails on PostgreSQL 10.13 — at Initial Version
Reported by: | Hannes Ljungberg | Owned by: | Hannes Ljungberg |
---|---|---|---|
Component: | contrib.postgres | Version: | 3.1 |
Severity: | Normal | Keywords: | tests |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
A couple of full text search related to headlines tests break on PostgresSQL 10.13. The reason appears to be that a trailing !
is now present in the results which breaks the equality checks. Looking at the 10.13 release notes (https://www.postgresql.org/docs/release/10.13/) it's probable that the patch "Fix ts_headline() to make better headline selections when working with phrase queries" introduced this behaviour.
Output of failures:
====================================================================== FAIL [0.015s]: test_headline (postgres_tests.test_search.SearchHeadlineTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tests/django/tests/postgres_tests/test_search.py", line 569, in test_headline '<b>Robin</b>. He was not at all afraid to be killed in nasty ' AssertionError: '<b>R[80 chars]brave</b>, <b>brave</b>, <b>brave</b> <b>Sir</b> <b>Robin</b>!' != '<b>R[80 chars]brave</b>, <b>brave</b>, <b>brave</b> <b>Sir</b> <b>Robin</b>' - <b>Robin</b>. He was not at all afraid to be killed in nasty ways. <b>Brave</b>, <b>brave</b>, <b>brave</b>, <b>brave</b> <b>Sir</b> <b>Robin</b>! ? - + <b>Robin</b>. He was not at all afraid to be killed in nasty ways. <b>Brave</b>, <b>brave</b>, <b>brave</b>, <b>brave</b> <b>Sir</b> <b>Robin</b> ====================================================================== FAIL [0.019s]: test_headline_separator_options (postgres_tests.test_search.SearchHeadlineTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tests/django/tests/postgres_tests/test_search.py", line 621, in test_headline_separator_options '<span>Robin</span>. He was not at all afraid to be killed in ' AssertionError: '<spa[122 chars]span>, <span>brave</span> <span>Sir</span> <span>Robin</span>!' != '<spa[122 chars]span>, <span>brave</span> <span>Sir</span> <span>Robin</span>' - <span>Robin</span>. He was not at all afraid to be killed in nasty ways. <span>Brave</span>, <span>brave</span>, <span>brave</span>, <span>brave</span> <span>Sir</span> <span>Robin</span>! ? - + <span>Robin</span>. He was not at all afraid to be killed in nasty ways. <span>Brave</span>, <span>brave</span>, <span>brave</span>, <span>brave</span> <span>Sir</span> <span>Robin</span> ====================================================================== FAIL [0.016s]: test_headline_short_word_option (postgres_tests.test_search.SearchHeadlineTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tests/django/tests/postgres_tests/test_search.py", line 650, in test_headline_short_word_option ), True) AssertionError: False is not True
Note:
See TracTickets
for help on using tickets.