Permalink
Browse files

add test

  • Loading branch information...
1 parent e19d498 commit 3d4ad0ac12787a5d2d167982b065ae5a5dfb1d19 @Eyjafjallajokull committed Jan 13, 2013
Showing with 7 additions and 1 deletion.
  1. +7 −1 tests/test_accuracy.py
View
8 tests/test_accuracy.py
@@ -37,4 +37,10 @@ def test_getNextValue(self):
self.assertEqual(real, cfg['start']*cfg['multiplier'])
self.assertEqual(scaled, cfg['start']*cfg['multiplier'])
-
+ def test_limit(self):
+ cfg = self.data['float']
+ object = AccuracyParam('float', cfg, cfg['start'])
+ for _ in range(0,100):
+ object.increase()
+ self.assertGreaterEqual(object.currentValue, cfg['minimum'])
+ self.assertFalse(object.canIncrease())

0 comments on commit 3d4ad0a

Please sign in to comment.