MCPcopy
hub / github.com/django/django / test_pad_negative_length

Method test_pad_negative_length

tests/db_functions/text/test_pad.py:42–48  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

40 )
41
42 def test_pad_negative_length(self):
43 for function in (LPad, RPad):
44 with self.subTest(function=function):
45 with self.assertRaisesMessage(
46 ValueError, "'length' must be greater or equal to 0."
47 ):
48 function("name", -1)
49
50 def test_combined_with_length(self):
51 Author.objects.create(name="Rhonda", alias="john_smith")

Callers

nothing calls this directly

Calls 2

functionFunction · 0.85
assertRaisesMessageMethod · 0.80

Tested by

no test coverage detected