summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2013-07-13 00:17:00 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2013-07-13 00:17:00 (GMT)
commit4064b2448c919ef5842211be140d18b2e5bcdff6 (patch)
treef3171dc7484edd58da67c61c072bb1dbe4af9ed3
parent0c92553d85b6d1d27c74fe47c7d84cb610de998b (diff)
parent04ff0382b24a9ce2aa47833a289288737b2e02e9 (diff)
downloadcpython-4064b2448c919ef5842211be140d18b2e5bcdff6.zip
cpython-4064b2448c919ef5842211be140d18b2e5bcdff6.tar.gz
cpython-4064b2448c919ef5842211be140d18b2e5bcdff6.tar.bz2
Merge with 3.3
-rw-r--r--Lib/idlelib/idle_test/mock_tk.py12
-rw-r--r--Lib/idlelib/idle_test/test_text.py3
2 files changed, 7 insertions, 8 deletions
diff --git a/Lib/idlelib/idle_test/mock_tk.py b/Lib/idlelib/idle_test/mock_tk.py
index c21ff43..3f6c579 100644
--- a/Lib/idlelib/idle_test/mock_tk.py
+++ b/Lib/idlelib/idle_test/mock_tk.py
@@ -210,7 +210,7 @@ class Text:
endline, endchar = startline+1, 0
else:
# do not delete terminal \n if index1 == 'insert'
- return
+ return
else:
endline, endchar = self._decode(index2, -1)
# restricting end position to insert position excludes terminal \n
@@ -219,11 +219,11 @@ class Text:
self.data[startline] = self.data[startline][:startchar] + \
self.data[startline][endchar:]
elif startline < endline:
- self.data[startline] = self.data[startline][:startchar] + \
- self.data[endline][endchar:]
- startline += 1
- for i in range(startline, endline+1):
- del self.data[startline]
+ self.data[startline] = self.data[startline][:startchar] + \
+ self.data[endline][endchar:]
+ startline += 1
+ for i in range(startline, endline+1):
+ del self.data[startline]
def compare(self, index1, op, index2):
line1, char1 = self._decode(index1)
diff --git a/Lib/idlelib/idle_test/test_text.py b/Lib/idlelib/idle_test/test_text.py
index 69419c1..367bf38 100644
--- a/Lib/idlelib/idle_test/test_text.py
+++ b/Lib/idlelib/idle_test/test_text.py
@@ -36,7 +36,7 @@ class TextTest(object):
self.assertEqual(index(dex), '1.0')
for dex in '1.0 lineend', '1.end', '1.33':
- self.assertEqual(index(dex), '1.5')
+ self.assertEqual(index(dex), '1.5')
for dex in 'end', '33.44':
self.assertEqual(index(dex), '3.0')
@@ -225,4 +225,3 @@ class TkTextTest(TextTest, unittest.TestCase):
if __name__ == '__main__':
unittest.main(verbosity=2, exit=False)
-