MCPcopy
hub / github.com/django/django / test_lefthand_division

Method test_lefthand_division

tests/expressions/tests.py:1751–1760  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1749 )
1750
1751 def test_lefthand_division(self):
1752 # LH Division of floats and integers
1753 Number.objects.filter(pk=self.n.pk).update(
1754 integer=F("integer") / 2, float=F("float") / 42.7
1755 )
1756
1757 self.assertEqual(Number.objects.get(pk=self.n.pk).integer, 21)
1758 self.assertEqual(
1759 Number.objects.get(pk=self.n.pk).float, Approximate(0.363, places=3)
1760 )
1761
1762 def test_lefthand_modulo(self):
1763 # LH Modulo arithmetic on integers

Callers

nothing calls this directly

Calls 5

FClass · 0.90
ApproximateClass · 0.90
updateMethod · 0.45
filterMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected