Ajout du GUI
This commit is contained in:
21
kivy/tests/test_issues/test_issue_599.py
Normal file
21
kivy/tests/test_issues/test_issue_599.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import unittest
|
||||
|
||||
|
||||
class Issue599(unittest.TestCase):
|
||||
|
||||
def test_minmax(self):
|
||||
from kivy.event import EventDispatcher
|
||||
from kivy.properties import BoundedNumericProperty
|
||||
|
||||
class PropertyWidget(EventDispatcher):
|
||||
foo = BoundedNumericProperty(1, min=-5, max=5)
|
||||
|
||||
wid = PropertyWidget()
|
||||
|
||||
self.assertEqual(wid.property('foo').get_min(wid), -5)
|
||||
wid.property('foo').set_min(wid, 0)
|
||||
self.assertEqual(wid.property('foo').get_min(wid), 0)
|
||||
|
||||
self.assertEqual(wid.property('foo').get_max(wid), 5)
|
||||
wid.property('foo').set_max(wid, 10)
|
||||
self.assertEqual(wid.property('foo').get_max(wid), 10)
|
||||
Reference in New Issue
Block a user