diff options
Diffstat (limited to 'python/tests/test_index.py')
| -rw-r--r-- | python/tests/test_index.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/python/tests/test_index.py b/python/tests/test_index.py index c21ad371..d2b39dd2 100644 --- a/python/tests/test_index.py +++ b/python/tests/test_index.py @@ -55,6 +55,13 @@ class TestStrike(unittest.TestCase): self.index.price = self.index.price self.assertAlmostEqual(self.index.spread, 75) + def test_pv_setting(self): + self.index.pv = self.index.pv + self.assertAlmostEqual(self.index.spread, 75) + self.index.direction = "Seller" + self.index.pv = self.index.pv + self.assertAlmostEqual(self.index.spread, 75) + class TestForwardIndex(unittest.TestCase): index = CreditIndex("ig", 26, "5yr", value_date=datetime.date(2016, 7, 1)) |
