diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_doctest.txt | 6 | ||||
-rw-r--r-- | Lib/test/test_file.py | 4 | ||||
-rw-r--r-- | Lib/test/test_inspect.py | 1 | ||||
-rw-r--r-- | Lib/test/test_softspace.py | 14 |
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') |