Commit c49bcf57 by Calen Pennington

Merge pull request #638 from MITx/feature/cale/progress-handle-extra-credit

Feature/cale/progress handle extra credit
parents f4f2efc3 8030fdce
......@@ -704,13 +704,15 @@ class ProgressTest(unittest.TestCase):
self.assertRaises(ValueError, Progress, 0, 0)
self.assertRaises(ValueError, Progress, 2, 0)
self.assertRaises(ValueError, Progress, 1, -2)
self.assertRaises(ValueError, Progress, 3, 2)
self.assertRaises(ValueError, Progress, -2, 5)
self.assertRaises(TypeError, Progress, 0, "all")
# check complex numbers just for the heck of it :)
self.assertRaises(TypeError, Progress, 2j, 3)
def test_clamp(self):
self.assertEqual((2, 2), Progress(3, 2).frac())
self.assertEqual((0, 2), Progress(-2, 2).frac())
def test_frac(self):
p = Progress(1, 2)
(a, b) = p.frac()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment