Setup method called before each test.
(self)
| 25 | """Test node deletion with actual GUI interactions.""" |
| 26 | |
| 27 | def setup_method(self): |
| 28 | """Setup method called before each test.""" |
| 29 | self.app = QApplication.instance() |
| 30 | if self.app is None: |
| 31 | self.app = QApplication(sys.argv) |
| 32 | |
| 33 | self.window = NodeEditorWindow() |
| 34 | self.graph = self.window.graph |
| 35 | self.view = self.window.view |
| 36 | |
| 37 | # Load the problematic file to reproduce the issue |
| 38 | try: |
| 39 | from data.file_operations import load_file |
| 40 | load_file(self.window, "examples/file_organizer_automation.md") |
| 41 | print("Loaded file_organizer_automation.md for testing") |
| 42 | except Exception as e: |
| 43 | print(f"Could not load file: {e}") |
| 44 | # Clear any existing content |
| 45 | self.graph.clear_graph() |
| 46 | |
| 47 | # Show window for visual debugging |
| 48 | self.window.show() |
| 49 | self.window.resize(1200, 800) |
| 50 | |
| 51 | def create_test_graph(self): |
| 52 | """Create a test graph with connected nodes.""" |
no test coverage detected