From 242d7a2f2031813ca455e97d3867f9cc9606989a Mon Sep 17 00:00:00 2001 From: "h0an.le" Date: Thu, 26 Sep 2024 18:02:18 +0200 Subject: [PATCH] test simplified code --- tests/test_1_reading_all_supported_data.py | 29 ++++++---------------- tests/test_2_loading_saved_files.py | 19 ++++---------- 2 files changed, 12 insertions(+), 36 deletions(-) diff --git a/tests/test_1_reading_all_supported_data.py b/tests/test_1_reading_all_supported_data.py index 4219f2b..9f391f5 100644 --- a/tests/test_1_reading_all_supported_data.py +++ b/tests/test_1_reading_all_supported_data.py @@ -1,28 +1,13 @@ -# # Test_1 -# import sys -# from pathlib import Path +# Test_1 +import sys +from pathlib import Path + +print("test") # sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) # import pytest -# # from examples.ex_reading_all_supported_data import ex_reading_all_supported_data +# from examples.ex_reading_all_supported_data import ex_reading_all_supported_data # def test_reading_all_supported_data(qtbot): -# print("test") -# # ex_reading_all_supported_data(run_app=False) - -import pytest -from PySide6.QtWidgets import QApplication - -@pytest.fixture(scope="module", autouse=True) -def app(qtbot): - # This is how you create a QApplication instance for testing - app = QApplication([]) - - # Ensure QApplication is quit after tests - yield app - app.quit() - -def test_some_functionality(qtbot): - print("test") - assert True # Replace with your actual test +# ex_reading_all_supported_data(run_app=False) diff --git a/tests/test_2_loading_saved_files.py b/tests/test_2_loading_saved_files.py index e6e9cc7..20ded26 100644 --- a/tests/test_2_loading_saved_files.py +++ b/tests/test_2_loading_saved_files.py @@ -4,21 +4,12 @@ # sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) # import pytest -# # from examples.ex_loading_saved_files import ex_loading_saved_files +# from examples.ex_loading_saved_files import ex_loading_saved_files # def test_loading_saved_files(qtbot): -# print("test") -# # ex_loading_saved_files(run_app=False) +# ex_loading_saved_files(run_app=False) -import pytest -from PySide6.QtWidgets import QApplication +import sys +from pathlib import Path -@pytest.fixture(scope="module", autouse=True) -def app(qtbot): - app = QApplication([]) - yield app - app.quit() - -def test_some_functionality(qtbot): - print("test") - assert True # Replace with your actual test +print("test") \ No newline at end of file