Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π Add cash_balance property to FakePortfolio (#63)
--- <details open="true"><summary>Generated summary (powered by <a href="https://app.graphite.dev">Graphite</a>)</summary> > ## TL;DR > This pull request introduces a new property `cash_balance` to the `Portfolio` class in `conftest.py` under the tests directory. > > ## What changed > A new property `cash_balance` was added to the `Portfolio` class. This property returns a float value of 0. This change is reflected in the `conftest.py` file. > > ```python > @Property > def cash_balance(self) -> float: > return 0 > ``` > > ## How to test > To test this change, you can create an instance of the `Portfolio` class and access the `cash_balance` property. The expected return value should be 0. > > ```python > portfolio = Portfolio() > print(portfolio.cash_balance) # should print 0 > ``` > > ## Why make this change > This change was made to provide a way to access the cash balance of a portfolio. This can be useful in scenarios where we need to check if the portfolio has enough cash balance to make a transaction. </details>
- Loading branch information