MCPcopy Create free account
hub / github.com/bhowiebkr/PyFlowGraph / setup_method

Method setup_method

tests/test_gui_node_deletion.py:27–49  ·  view source on GitHub ↗

Setup method called before each test.

(self)

Source from the content-addressed store, hash-verified

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."""

Callers 1

mainFunction · 0.95

Calls 3

NodeEditorWindowClass · 0.90
load_fileFunction · 0.90
clear_graphMethod · 0.80

Tested by

no test coverage detected