Skip to content

Commit

Permalink
TST: Update related display button test to be compatible with a depre…
Browse files Browse the repository at this point in the history
…cated and now removed warns() usage in pytest 8.0
  • Loading branch information
jbellister-slac committed Feb 5, 2024
1 parent bf17dc3 commit b270698
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pydm/tests/widgets/test_related_display_button.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import pytest
import sys
import warnings
from qtpy.QtCore import Qt, QSize
from qtpy.QtWidgets import QApplication
from ...utilities.stylesheet import global_style
Expand All @@ -24,7 +25,7 @@ def test_old_display_filename_property(qtbot):
main_window.setWindowTitle("Related Display Button Test")
qtbot.addWidget(main_window)
button = PyDMRelatedDisplayButton(parent=main_window)
with pytest.warns(None) as record:
with warnings.catch_warnings(record=True) as record:
button.displayFilename = test_ui_path
assert len(record) >= 1
assert button.filenames[0] == test_ui_path
Expand Down

0 comments on commit b270698

Please sign in to comment.