@@ -48,16 +48,6 @@ def test_pv_decimal(self):
48
48
Decimal ('0' )),
49
49
Decimal ('-127128.1709461939327295222005' ))
50
50
51
- def test_npv (self ):
52
- assert_almost_equal (
53
- npf .npv (0.05 , [- 15000 , 1500 , 2500 , 3500 , 4500 , 6000 ]),
54
- 122.89 , 2 )
55
-
56
- def test_npv_decimal (self ):
57
- assert_equal (
58
- npf .npv (Decimal ('0.05' ), [- 15000 , 1500 , 2500 , 3500 , 4500 , 6000 ]),
59
- Decimal ('122.894854950942692161628715' ))
60
-
61
51
def test_when (self ):
62
52
# begin
63
53
assert_equal (npf .rate (10 , 20 , - 3500 , 10000 , 1 ),
@@ -130,6 +120,18 @@ def test_decimal_with_when(self):
130
120
Decimal ('0' ), 'end' ))
131
121
132
122
123
+ class TestNpv :
124
+ def test_npv (self ):
125
+ assert_almost_equal (
126
+ npf .npv (0.05 , [- 15000 , 1500 , 2500 , 3500 , 4500 , 6000 ]),
127
+ 122.89 , 2 )
128
+
129
+ def test_npv_decimal (self ):
130
+ assert_equal (
131
+ npf .npv (Decimal ('0.05' ), [- 15000 , 1500 , 2500 , 3500 , 4500 , 6000 ]),
132
+ Decimal ('122.894854950942692161628715' ))
133
+
134
+
133
135
class TestPmt :
134
136
def test_pmt (self ):
135
137
res = npf .pmt (0.08 / 12 , 5 * 12 , 15000 )
0 commit comments