We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25106c4 commit 2b411c5Copy full SHA for 2b411c5
src/tests/test_price_stabilization.py
@@ -0,0 +1,19 @@
1
+import unittest
2
+from price_stabilization import PriceStabilization
3
+
4
+class TestPriceStabilization(unittest.TestCase):
5
+ def setUp(self):
6
+ self.ps = PriceStabilization()
7
8
+ def test_predict_price(self):
9
+ self.ps.update_price_history(100)
10
+ self.ps.update_price_history(105)
11
+ predicted = self.ps.predict_price()
12
+ self.assertAlmostEqual(predicted, 105, delta=1)
13
14
+ def test_adjust_supply(self):
15
+ action = self.ps.adjust_supply(95, 100)
16
+ self.assertEqual(action, "Increase supply")
17
18
+if __name__ == '__main__':
19
+ unittest.main()
0 commit comments