mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
bpo-42426: IDLE: Fix reporting offset of the RE error in searchengine (GH-23447)
This commit is contained in:
parent
442746af64
commit
453bc1da20
4 changed files with 11 additions and 9 deletions
|
|
@ -175,11 +175,13 @@ class SearchEngineTest(unittest.TestCase):
|
|||
|
||||
engine.setpat('')
|
||||
Equal(engine.getprog(), None)
|
||||
Equal(Mbox.showerror.message,
|
||||
'Error: Empty regular expression')
|
||||
engine.setpat('+')
|
||||
engine.revar.set(1)
|
||||
Equal(engine.getprog(), None)
|
||||
self.assertEqual(Mbox.showerror.message,
|
||||
'Error: nothing to repeat at position 0\nPattern: +')
|
||||
Equal(Mbox.showerror.message,
|
||||
'Error: nothing to repeat\nPattern: +\nOffset: 0')
|
||||
|
||||
def test_report_error(self):
|
||||
showerror = Mbox.showerror
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue