_________________________________ test_typical _________________________________
main_window = <RodTracker.ui.mainwindow.RodTrackWindow object at 0x7f702c9a3ca0>
qtbot = <pytestqt.qtbot.QtBot object at 0x7f702c4c7fd0>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f702c374070>
tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-0/test_typical0')
@pytest.mark.filterwarnings("ignore:")
def test_typical(
main_window: RodTrackWindow,
qtbot: QtBot,
monkeypatch: MonkeyPatch,
tmp_path: pathlib.Path,
):
"""Attempt a typical workflow."""
try:
scenario = [
ga.OpenData(conftest.csv_data),
ga.OpenImage(conftest.cam1_img1),
ga.SwitchCamera(),
ga.OpenImage(conftest.cam2_img1),
ga.SwitchRodNumber(12, 7, lg.NumberChangeActions.ALL_ONE_CAM),
ga.SwitchCamera(),
ga.SwitchRodNumber(7, 12, lg.NumberChangeActions.CURRENT),
ga.SwitchFrame(1),
ga.SwitchFrame(1),
ga.ChangeRodPosition(12),
ga.CreateRod(25),
ga.SwitchCamera(),
ga.LengthAdjustment(QtCore.Qt.Key_T),
ga.SwitchColor("blue"),
ga.DeleteRod(12),
ga.SaveChanges(),
]
for action in scenario:
> main_window = action.run(main_window, qtbot, monkeypatch, tmp_path)
tests/test_userinteraction/test_usecases.py:75:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/gui_actions.py:272: in run
aa.post_number_switch(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
main_window = <RodTracker.ui.mainwindow.RodTrackWindow object at 0x7f702c9a3ca0>
rod_id = 12, new_id = 7, mode = <NumberChangeActions.ALL_ONE_CAM: 2>
initial_state = {'dataset': x1 y1 z1 ... seen_gp4 particle color
0 -5.289254 3.563160 4.213875 ......3779839, 86.78520334109191], 'rod2_pos': [40.8029642065812, 23.430269667032004, 47.53805048682671, 29.433259962428203]}
def post_number_switch(
main_window: RodTrackWindow,
rod_id: int,
new_id: int,
mode: Union[NumberChangeActions, None],
initial_state: dict,
):
# currently displayed/loaded
rod1_new_pos = get_rod_position(main_window, rod_id)
if mode is not None:
rod2_new_pos = get_rod_position(main_window, new_id)
> assert rod1_new_pos == initial_state["rod2_pos"]
E AssertionError
tests/action_assertions.py:201: AssertionError
------------------------------ Captured log setup ------------------------------
INFO RodTracker.ui.loggerwidget:loggerwidget.py:63 /home/runner/.local/share/RodTracker/Session_ovx08pse
------------------------------ Captured log call -------------------------------
INFO RodTracker.ui.loggerwidget:loggerwidget.py:139 (RodData) Loaded rod file(s) from: /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/RodTracker/resources/example_data/csv
INFO RodTracker.ui.loggerwidget:loggerwidget.py:139 (camera_0) (gp3) 25 image file(s) loaded from: /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/RodTracker/resources/example_data/images/gp3
INFO RodTracker.ui.loggerwidget:loggerwidget.py:139 (camera_1) (gp4) 25 image file(s) loaded from: /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/RodTracker/resources/example_data/images/gp4
INFO RodTracker.ui.loggerwidget:loggerwidget.py:139 (gp4, 500, ) Changed rod #12 ---> #7 of color in frames >= 500 of gp4.
Description
During automated testing of RodTracker the tests for user interactions with the GUI/whole program fail.
This was not observed when testing locally. So far I was also unable to reproduce it.
List of failed tests:
Logs
There appear to be at least 2 failure modes: