diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-11-22 05:06:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-22 05:06:51 (GMT) |
commit | 453bc1da2023d6cbe362637a2e0b06d0521f013c (patch) | |
tree | b872c7850c15ffedf4ec67601743def89689ce18 /Lib/idlelib/idle_test | |
parent | 442746af649cc2c20d690acfabf44ab0e06c36b4 (diff) | |
download | cpython-453bc1da2023d6cbe362637a2e0b06d0521f013c.zip cpython-453bc1da2023d6cbe362637a2e0b06d0521f013c.tar.gz cpython-453bc1da2023d6cbe362637a2e0b06d0521f013c.tar.bz2 |
bpo-42426: IDLE: Fix reporting offset of the RE error in searchengine (GH-23447)
Diffstat (limited to 'Lib/idlelib/idle_test')
-rw-r--r-- | Lib/idlelib/idle_test/test_searchengine.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/idlelib/idle_test/test_searchengine.py b/Lib/idlelib/idle_test/test_searchengine.py index 3d26d62..f8401ce 100644 --- a/Lib/idlelib/idle_test/test_searchengine.py +++ b/Lib/idlelib/idle_test/test_searchengine.py @@ -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 |