Exemplo n.º 1
0
 def test_VDB_partial_no_switch(self):
     self.assertAlmostEqual(
         financial.VDB(
             cost=1,
             salvage=0,
             life=5.0,
             start_period=0.5,
             end_period=1.5,
             factor=2.5,
         ),
         0.375
     )
Exemplo n.º 2
0
 def test_VDB(self):
     self.assertAlmostEqual(
         financial.VDB(
             cost=575000,
             salvage=5000,
             life=10,
             start_period=3,
             end_period=5,
             factor=1.5,
         ),
         102160.546875
     )
Exemplo n.º 3
0
 def test_VDB_partial(self):
     self.assertAlmostEqual(
         financial.VDB(
             cost=1,
             salvage=0,
             life=14,
             start_period=11.5,
             end_period=12.5,
             factor=1.25,
         ),
         0.068726290454684
     )
Exemplo n.º 4
0
 def test_VDB_non_integer_life(self):
     self.assertAlmostEqual(
         financial.VDB(
             cost=575000,
             salvage=5000,
             life=10.5,
             start_period=3,
             end_period=5,
             factor=1.5,
         ),
         98708.55092429437
     )