summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/idle_test
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-11-22 05:24:11 (GMT)
committerGitHub <noreply@github.com>2020-11-22 05:24:11 (GMT)
commit28b40d7a349787817fe5f6ebfa753c29b96c8832 (patch)
treecb35736b15ce39dde33e8e9955f3750f3e4d1466 /Lib/idlelib/idle_test
parent6e665424d6e7abf6d6de010609a398a7407df83c (diff)
downloadcpython-28b40d7a349787817fe5f6ebfa753c29b96c8832.zip
cpython-28b40d7a349787817fe5f6ebfa753c29b96c8832.tar.gz
cpython-28b40d7a349787817fe5f6ebfa753c29b96c8832.tar.bz2
bpo-42426: IDLE: Fix reporting offset of the RE error in searchengine (GH-23447)
(cherry picked from commit 453bc1da2023d6cbe362637a2e0b06d0521f013c) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/idlelib/idle_test')
-rw-r--r--Lib/idlelib/idle_test/test_searchengine.py6
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