MCPcopy
hub / github.com/django/django / test_right_hand_division

Method test_right_hand_division

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

Source from the content-addressed store, hash-verified

1871 )
1872
1873 def test_right_hand_division(self):
1874 # RH Division of floats and integers
1875 Number.objects.filter(pk=self.n.pk).update(
1876 integer=640 / F("integer"), float=42.7 / F("float")
1877 )
1878
1879 self.assertEqual(Number.objects.get(pk=self.n.pk).integer, 15)
1880 self.assertEqual(
1881 Number.objects.get(pk=self.n.pk).float, Approximate(2.755, places=3)
1882 )
1883
1884 def test_right_hand_modulo(self):
1885 # RH 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