mirror of
https://github.com/python/cpython.git
synced 2025-07-30 14:44:10 +00:00
#2348: add py3k warning for file.softspace.
This commit is contained in:
parent
07e5681fd3
commit
65bb42dc1b
3 changed files with 46 additions and 2 deletions
|
@ -108,6 +108,16 @@ class TestPy3KWarnings(unittest.TestCase):
|
|||
with catch_warning() as w:
|
||||
self.assertWarning(dir(c), w, expected)
|
||||
|
||||
def test_softspace(self):
|
||||
expected = 'file.softspace not supported in 3.x'
|
||||
with file(__file__) as f:
|
||||
with catch_warning() as w:
|
||||
self.assertWarning(f.softspace, w, expected)
|
||||
def set():
|
||||
f.softspace = 0
|
||||
with catch_warning() as w:
|
||||
self.assertWarning(set(), w, expected)
|
||||
|
||||
|
||||
def test_main():
|
||||
run_unittest(TestPy3KWarnings)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue