1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Converted comments to docstrings.

This commit is contained in:
GappleBee 2024-11-22 22:11:34 +00:00
parent d2aacd57dd
commit 531ecfb379

View File

@ -814,8 +814,10 @@ class TestLexemes(GrailTestData, PostgreSQLTestCase):
self.assertCountEqual(searched, [self.verse1, self.verse2, self.verse0]) self.assertCountEqual(searched, [self.verse1, self.verse2, self.verse0])
def test_advanced(self): def test_advanced(self):
# Test cominbation of & and | """
# This is mainly helpful for checking the test_advanced_invert below Test cominbation of & and |
This is mainly helpful for checking the test_advanced_invert below
"""
searched = Line.objects.annotate(search=SearchVector("dialogue")).filter( searched = Line.objects.annotate(search=SearchVector("dialogue")).filter(
search=SearchQuery( search=SearchQuery(
Lexeme("shall") & Lexeme("use") & Lexeme("larger") | Lexeme("nostrils") Lexeme("shall") & Lexeme("use") & Lexeme("larger") | Lexeme("nostrils")
@ -830,8 +832,10 @@ class TestLexemes(GrailTestData, PostgreSQLTestCase):
self.assertCountEqual(searched, [self.verse0, self.verse2]) self.assertCountEqual(searched, [self.verse0, self.verse2])
def test_advanced_invert(self): def test_advanced_invert(self):
# Test inverting a query that uses a cominbation of & and | """
# Should return the opposite of test_advanced Test inverting a query that uses a cominbation of & and |
Should return the opposite of test_advanced
"""
searched = Line.objects.annotate(search=SearchVector("dialogue")).filter( searched = Line.objects.annotate(search=SearchVector("dialogue")).filter(
search=SearchQuery( search=SearchQuery(
~( ~(