10 lines
444 B
Python
10 lines
444 B
Python
import unittest
|
|
from phase2_b15_recovery import phase_projection
|
|
class ProjectionTests(unittest.TestCase):
|
|
def test_prior_counted_once(self):self.assertEqual(phase_projection(2100,1000,100,50),2725)
|
|
def test_no_remaining(self):self.assertEqual(phase_projection(2100,1000,100,0),2100)
|
|
def test_inputs(self):
|
|
for a in [(1,1,0,1),(1,1,2,-1)]:
|
|
with self.assertRaises(ValueError):phase_projection(*a)
|
|
if __name__=='__main__':unittest.main()
|