Skip to content

Commit 2adfb73

Browse files
committed
Merge pull request kivy#4321 from kivy/alias-test
Internal alias property details should not be assumed and tested.
2 parents 86ad546 + 208c5eb commit 2adfb73

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

kivy/tests/test_properties.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -310,28 +310,20 @@ def _set_prop(self, value):
310310
self.assertEqual(wid.basevalue, 1)
311311
self.assertEqual(observe_called, 0)
312312

313-
# first call, goes in cache
314-
self.assertEqual(wid.prop, 2)
315-
self.assertEqual(observe_called, 1)
316-
317-
# second call, cache used
318-
self.assertEqual(wid.prop, 2)
319-
self.assertEqual(observe_called, 1)
320-
321313
# change the base value, should trigger an update for the cache
322314
wid.basevalue = 4
323-
self.assertEqual(observe_called, 2)
315+
self.assertEqual(observe_called, 1)
324316

325-
# now read the value again, should use the cache too
317+
# now read the value again, should use the cache
326318
self.assertEqual(wid.prop, 8)
327-
self.assertEqual(observe_called, 2)
319+
self.assertEqual(observe_called, 1)
328320

329321
# change the prop itself, should trigger an update for the cache
330322
wid.prop = 4
331-
self.assertEqual(observe_called, 3)
323+
self.assertEqual(observe_called, 2)
332324
self.assertEqual(wid.basevalue, 2)
333325
self.assertEqual(wid.prop, 4)
334-
self.assertEqual(observe_called, 3)
326+
self.assertEqual(observe_called, 2)
335327

336328
def test_bounded_numeric_property(self):
337329
from kivy.properties import BoundedNumericProperty

0 commit comments

Comments
 (0)