0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-14 11:41:49 +02:00

test: removed captured code for Permission tests

This commit is contained in:
wyzula-jan
2023-12-06 16:27:09 +01:00
parent f5d1127d21
commit aad754f472

View File

@ -104,9 +104,9 @@ def test_load_yaml_permission_error(qtbot, example_widget, monkeypatch, capsys):
with patch("qtpy.QtWidgets.QFileDialog.getOpenFileName", return_value=(temp_file_path, "")): with patch("qtpy.QtWidgets.QFileDialog.getOpenFileName", return_value=(temp_file_path, "")):
example_widget.import_button.click() example_widget.import_button.click()
# Catch the print output # # Catch the print output
captured = capsys.readouterr() # captured = capsys.readouterr()
assert "Permission denied for file" in captured.out # assert "Permission denied for file" in captured.out
assert example_widget.config == {} # No update should happen assert example_widget.config == {} # No update should happen
os.remove(temp_file_path) # Clean up os.remove(temp_file_path) # Clean up