← スキル一覧に戻る

test-gui
by tatsuki-washimi
gwpy expansions for experiments
⭐ 0🍴 0📅 2026年1月25日
SKILL.md
name: test_gui description: GUIアプリケーションの動作試験・デバッグを自動で行う
Test and Debug GUI
This skill helps in testing and debugging gwexpy.gui.
Instructions
-
Run Automated Tests:
- Run tests specifically marked for GUI (usually requiring
pytest-qt). - Command:
pytest -m guiorpytest tests/gui/. (Adjust based on actual markers/folders). - Check
scripts/run_gui_tests.shif it exists and run it.
- Run tests specifically marked for GUI (usually requiring
-
Debug Crashes:
- If the GUI crashes (e.g. segmentation fault), look for logs or run with
gdbif necessary/possible. - Check typical PyQt issues: Thread safety (updating UI from background thread), signal/slot mismatches, object lifecycle (Python garbage collecting C++ objects).
- If the GUI crashes (e.g. segmentation fault), look for logs or run with
-
Interactive Debugging:
- Since this is an agent, "interactive" means adding print debugging or logging to the code and running it to capture output.
- Focus on
gwexpy/gui/main_window.pyor relevant widget files.
Best Practices
- Avoid Binding Conflicts: Use
qtpyfor imports in test files (e.g.from qtpy import QtWidgets). - Environment Variables: If multiple top-level bindings are installed, enforce consistency:
export QT_API=pyqt5export PYTEST_QT_API=pyqt5
- Handling Blocking Windows (plt.show):
-
When testing code that calls
plt.show()orapp.exec_(), useQTimerto close it automatically. -
Example:
from qtpy.QtCore import QTimer # ... inside test ... # Close active window after 100ms QTimer.singleShot(100, plt.close) # Or for raw Qt widgets: # QTimer.singleShot(100, widget.close) # Then call the blocking function plt.show()
-
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です