Skip to content

Commit 08d93fc

Browse files
committed
TEST: Remove deprecated tests.
1 parent 5bc82f5 commit 08d93fc

File tree

1 file changed

+0
-113
lines changed

1 file changed

+0
-113
lines changed

faslr/tests/index/test_index.py

Lines changed: 0 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,15 @@
77
import faslr.core as core
88
from faslr.index import (
99
calculate_index_factors,
10-
IndexPane,
1110
IndexInventory
1211
)
1312

14-
from faslr.model import FModelIndex
15-
1613
from faslr.methods.expected_loss import (
1714
ExpectedLossWidget
1815
)
1916

2017
from faslr.utilities import (
2118
load_sample,
22-
ppa_loss_trend,
2319
subset_dict,
2420
)
2521

@@ -95,26 +91,6 @@ def df_tort_index(
9591

9692
return df_res
9793

98-
99-
@pytest.fixture()
100-
def index_pane(
101-
qtbot: QtBot
102-
) -> IndexPane:
103-
"""
104-
Setup common index pane used for testing.
105-
:param qtbot: The QtBot fixture.
106-
:return: An IndexPane object.
107-
"""
108-
109-
dummy_ays = list(range(2000, 2009))
110-
111-
index_pane = IndexPane(years=dummy_ays)
112-
113-
qtbot.addWidget(index_pane)
114-
115-
yield index_pane
116-
117-
11894
@pytest.fixture()
11995
def expected_loss(
12096
qtbot: QtBot
@@ -146,95 +122,6 @@ def expected_loss(
146122
yield widget
147123

148124

149-
def test_index_pane(
150-
qtbot: QtBot,
151-
index_pane: IndexPane
152-
) -> None:
153-
"""
154-
Test initialization of index pane and enter a constant trend factor.
155-
:param qtbot: The QtBot fixture.
156-
:param index_pane: The index_pane fixture.
157-
:return: None.
158-
"""
159-
160-
def constant_handler() -> None:
161-
"""
162-
Handle the constant factor dialog box.
163-
:return: None
164-
"""
165-
166-
keyboard = Controller()
167-
168-
dialog = QApplication.activeModalWidget()
169-
170-
qtbot.waitUntil(
171-
callback=dialog.isVisible,
172-
timeout=5000
173-
)
174-
175-
keyboard.type('.05')
176-
177-
keyboard.press(Key.enter)
178-
keyboard.release(Key.enter)
179-
180-
blank_idx = index_pane.model.index(0, 0)
181-
blank_test = index_pane.model.data(
182-
index=blank_idx,
183-
role=Qt.ItemDataRole.DisplayRole
184-
)
185-
assert blank_test == ''
186-
187-
QTimer.singleShot(
188-
500,
189-
constant_handler
190-
)
191-
192-
qtbot.mouseClick(
193-
index_pane.constant_btn,
194-
Qt.MouseButton.LeftButton,
195-
delay=1
196-
)
197-
198-
change_idx = index_pane.model.index(
199-
0,
200-
0
201-
)
202-
203-
factor_idx = index_pane.model.index(
204-
0,
205-
1
206-
)
207-
208-
change_test = index_pane.model.data(
209-
index=change_idx,
210-
role=Qt.ItemDataRole.DisplayRole
211-
)
212-
213-
factor_test = index_pane.model.data(
214-
index=factor_idx,
215-
role=Qt.ItemDataRole.DisplayRole
216-
)
217-
218-
assert change_test == "5.0%"
219-
220-
assert factor_test == "1.477"
221-
222-
223-
def test_index_pane_blank(
224-
qtbot: QtBot
225-
) -> None:
226-
227-
"""
228-
Test generation of a blank index pane.
229-
:param qtbot: The QtBot fixture.
230-
:return: None.
231-
"""
232-
233-
index_pane = IndexPane()
234-
235-
qtbot.addWidget(index_pane)
236-
237-
238125
def test_index_inventory(
239126
qtbot: QtBot,
240127
f_core

0 commit comments

Comments
 (0)