From c76233ae334a2baa88aeb14d25bc68ab8078bd78 Mon Sep 17 00:00:00 2001 From: pudelko Date: Mon, 30 Dec 2024 21:35:39 +0100 Subject: [PATCH] ci test codecov --- .github/workflows/test_with_coverage.yml | 4 --- piva/tests/viewers_test.py | 35 ++++++++++++------------ 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/.github/workflows/test_with_coverage.yml b/.github/workflows/test_with_coverage.yml index d5e8c15..496d413 100644 --- a/.github/workflows/test_with_coverage.yml +++ b/.github/workflows/test_with_coverage.yml @@ -60,8 +60,6 @@ jobs: run: > pytest --cov=$GITHUB_WORKSPACE --cov-append --cov-report=xml --cov-config=.coveragerc piva/tests/dataloaders_test.py -# pytest --cov=$GITHUB_WORKSPACE --cov-report=xml -# piva/tests/dataloaders_test.py - name: Test viewers - install prerequisites run: > @@ -79,8 +77,6 @@ jobs: run: > pytest --cov=$GITHUB_WORKSPACE --cov-append --cov-report=xml --cov-config=.coveragerc piva/tests/viewers_test.py -# pytest --cov=$GITHUB_WORKSPACE --cov-report=xml -# piva/tests/viewers_test.py - name: Upload coverage to Codecov if: > diff --git a/piva/tests/viewers_test.py b/piva/tests/viewers_test.py index 8efffde..1020c7d 100644 --- a/piva/tests/viewers_test.py +++ b/piva/tests/viewers_test.py @@ -658,16 +658,15 @@ def test_viewers(self, qtbot: Any) -> None: :param qtbot: object emulating a user """ - print('elo') - # self.open_browser(qtbot) + self.open_browser(qtbot) if CHECK_3D_Viewer_: self.check_3Dv_sliders(qtbot) self.check_3Dv_orientate_tab(qtbot) self.check_3Dv_axes_tab(qtbot) self.check_3Dv_image_tab(qtbot) - # # open first 2Dviewer - # self.open_2Dviewer(qtbot) + # open first 2Dviewer + self.open_2Dviewer(qtbot) if CHECK_2D_Viewer_: self.check_2dv_sliders(qtbot) @@ -700,20 +699,20 @@ def test_viewers(self, qtbot: Any) -> None: self.browser.data_viewers.keys()) is False qtbot.wait(LONG_WT) - # # close first 2Dviewer - # qtbot.mouseClick(self.up_2dv.close_button, Qt.LeftButton) - # assert (self._2dv_title in - # self.browser.data_viewers.keys()) is False - # qtbot.wait(LONG_WT) - # - # if CHECK_K_SPC_CONV: - # self.check_kspace_conversion(qtbot) - # self.save_converted_viewer() - # qtbot.wait(LONG_WT * 3) - # self.check_BZ_contour(qtbot) - # - # qtbot.wait(LONG_WT * 5) - # self._3dv.close() + # close first 2Dviewer + qtbot.mouseClick(self.up_2dv.close_button, Qt.LeftButton) + assert (self._2dv_title in + self.browser.data_viewers.keys()) is False + qtbot.wait(LONG_WT) + + if CHECK_K_SPC_CONV: + self.check_kspace_conversion(qtbot) + self.save_converted_viewer() + qtbot.wait(LONG_WT * 3) + self.check_BZ_contour(qtbot) + + qtbot.wait(LONG_WT * 5) + self._3dv.close() def change_spinBox(bot: Any, widget: Any, steps: int, key: Any,