(self)
| 123 | self.assertEqual(tracker.current.file_path, "test.py") |
| 124 | |
| 125 | def test_history(self) -> None: |
| 126 | tracker = SelectionTracker(max_history=3) |
| 127 | for i in range(5): |
| 128 | tracker.update(IDESelection( |
| 129 | file_path=f"file{i}.py", |
| 130 | text=f"text{i}", |
| 131 | range=IDERange(1, 0, 1, 5), |
| 132 | )) |
| 133 | # Max 3 in history |
| 134 | self.assertEqual(len(tracker.history), 3) |
| 135 | self.assertEqual(tracker.history[0].file_path, "file4.py") |
| 136 | |
| 137 | def test_listener(self) -> None: |
| 138 | tracker = SelectionTracker() |
nothing calls this directly
no test coverage detected