summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-02-09 23:20:19 (GMT)
committerGuido van Rossum <guido@python.org>2007-02-09 23:20:19 (GMT)
commit79139b247b0bc0bc1b1a12932140bbd4bc188df7 (patch)
treefef7ef79dcb4e2a1ca033e725b1c2d802e9447d2 /Lib/test
parentbdc36e4d9e754dd00f17f67a943217a1829c75b3 (diff)
downloadcpython-79139b247b0bc0bc1b1a12932140bbd4bc188df7.zip
cpython-79139b247b0bc0bc1b1a12932140bbd4bc188df7.tar.gz
cpython-79139b247b0bc0bc1b1a12932140bbd4bc188df7.tar.bz2
Kill off softspace completely (except in formatter.py which seems to have
a different feature with the same name). The change to test_doctest.txt reduces the doctest failures to 3.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_doctest.txt6
-rw-r--r--Lib/test/test_file.py4
-rw-r--r--Lib/test/test_inspect.py1
-rw-r--r--Lib/test/test_softspace.py14
4 files changed, 3 insertions, 22 deletions
diff --git a/Lib/test/test_doctest.txt b/Lib/test/test_doctest.txt
index f8e851e..23446d1 100644
--- a/Lib/test/test_doctest.txt
+++ b/Lib/test/test_doctest.txt
@@ -9,9 +9,9 @@ already:
We can make this fail by disabling the blank-line feature.
>>> if 1:
- ... print 'a'
- ... print
- ... print 'b'
+ ... print('a')
+ ... print()
+ ... print('b')
a
<BLANKLINE>
b
diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py
index 91f6e76..7eb052b 100644
--- a/Lib/test/test_file.py
+++ b/Lib/test/test_file.py
@@ -30,14 +30,10 @@ class AutoFileTests(unittest.TestCase):
def testAttributes(self):
# verify expected attributes exist
f = self.f
- softspace = f.softspace
f.name # merely shouldn't blow up
f.mode # ditto
f.closed # ditto
- # verify softspace is writable
- f.softspace = softspace # merely shouldn't blow up
-
# verify the others aren't
for attr in 'name', 'mode', 'closed':
self.assertRaises((AttributeError, TypeError), setattr, f, attr, 'oops')
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py
index 071e521..296e259 100644
--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -61,7 +61,6 @@ class TestPredicates(IsTestBase):
self.istest(inspect.ismodule, 'mod')
self.istest(inspect.istraceback, 'tb')
self.istest(inspect.isdatadescriptor, '__builtin__.file.closed')
- self.istest(inspect.isdatadescriptor, '__builtin__.file.softspace')
if hasattr(types, 'GetSetDescriptorType'):
self.istest(inspect.isgetsetdescriptor,
'type(tb.tb_frame).f_locals')
diff --git a/Lib/test/test_softspace.py b/Lib/test/test_softspace.py
deleted file mode 100644
index c0b4e8f..0000000
--- a/Lib/test/test_softspace.py
+++ /dev/null
@@ -1,14 +0,0 @@
-from test import test_support
-import StringIO
-
-# SF bug 480215: softspace confused in nested print
-f = StringIO.StringIO()
-class C:
- def __str__(self):
- print('a', file=f)
- return 'b'
-
-print(C(), 'c ', 'd\t', 'e', file=f)
-print('f', 'g', file=f)
-# In 2.2 & earlier, this printed ' a\nbc d\te\nf g\n'
-test_support.vereq(f.getvalue(), 'a\nb c d\te\nf g\n')