MCPcopy
hub / github.com/django/django / test_quote_lexeme

Method test_quote_lexeme

tests/postgres_tests/test_search.py:872–885  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

870 self.assertEqual(params, expected_params)
871
872 def test_quote_lexeme(self):
873 tests = (
874 ("L'amour piqué par une abeille", "'L amour piqué par une abeille'"),
875 ("'starting quote", "'starting quote'"),
876 ("ending quote'", "'ending quote'"),
877 ("double quo''te", "'double quo te'"),
878 ("triple quo'''te", "'triple quo te'"),
879 ("backslash\\", "'backslash'"),
880 ("exclamation!", "'exclamation'"),
881 ("ampers&nd", "'ampers nd'"),
882 )
883 for lexeme, quoted in tests:
884 with self.subTest(lexeme=lexeme):
885 self.assertEqual(quote_lexeme(lexeme), quoted)
886
887 def test_prefix_searching(self):
888 searched = Line.objects.annotate(

Callers

nothing calls this directly

Calls 1

quote_lexemeFunction · 0.90

Tested by

no test coverage detected