()
| 241 | |
| 242 | |
| 243 | def test_add_widget(): |
| 244 | doc = pymupdf.open() |
| 245 | page = doc.new_page() |
| 246 | w = pymupdf.Widget() |
| 247 | w.field_type = pymupdf.PDF_WIDGET_TYPE_BUTTON |
| 248 | w.rect = pymupdf.Rect(5, 5, 20, 20) |
| 249 | w.field_flags = pymupdf.PDF_BTN_FIELD_IS_PUSHBUTTON |
| 250 | w.field_name = "button" |
| 251 | w.fill_color = (0, 0, 1) |
| 252 | w.script = "app.alert('Hello, PDF!');" |
| 253 | page.add_widget(w) |
| 254 | |
| 255 | |
| 256 | def test_interfield_calculation(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…