Entering invalid value in an entry field (especially the case when text contains `,`)
(qtbot, full_range, selection, value_type)
| 640 | ]) |
| 641 | # fmt: on |
| 642 | def test_RangeManager_9(qtbot, full_range, selection, value_type): |
| 643 | """Entering invalid value in an entry field (especially the case when text contains `,`)""" |
| 644 | |
| 645 | slider_steps = 1000 |
| 646 | selection_to_range_min = 0.01 |
| 647 | |
| 648 | rman = RangeManager(slider_steps=slider_steps, selection_to_range_min=selection_to_range_min) |
| 649 | qtbot.addWidget(rman) |
| 650 | rman.show() |
| 651 | |
| 652 | rman.set_range(full_range[0], full_range[1]) |
| 653 | rman.set_selection(value_low=selection[0], value_high=selection[1]) |
| 654 | |
| 655 | assert rman.get_selection() == selection, "Incorrect selection" |
| 656 | |
| 657 | enter_text_via_keyboard(qtbot, rman.le_min_value, "abc", finish=True) |
| 658 | assert rman.get_selection() == selection, "Incorrect selection" |
| 659 | |
| 660 | enter_text_via_keyboard(qtbot, rman.le_min_value, "10,", finish=True) |
| 661 | assert rman.get_selection() == selection, "Incorrect selection" |
| 662 | |
| 663 | enter_text_via_keyboard(qtbot, rman.le_max_value, "abc", finish=True) |
| 664 | assert rman.get_selection() == selection, "Incorrect selection" |
| 665 | |
| 666 | enter_text_via_keyboard(qtbot, rman.le_max_value, "10.0,", finish=True) |
| 667 | assert rman.get_selection() == selection, "Incorrect selection" |
nothing calls this directly
no test coverage detected