mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-94352: shlex.split() no longer accepts None (#94353)
shlex.split(): Passing None for s argument now raises an exception, rather than reading sys.stdin. The feature was deprecated in Python 3.9.
This commit is contained in:
parent
670f7f10cf
commit
fbcee570d1
5 changed files with 14 additions and 9 deletions
|
@ -162,9 +162,8 @@ class ShlexTest(unittest.TestCase):
|
|||
tok = lex.get_token()
|
||||
return ret
|
||||
|
||||
@mock.patch('sys.stdin', io.StringIO())
|
||||
def testSplitNoneDeprecation(self):
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
def testSplitNone(self):
|
||||
with self.assertRaises(ValueError):
|
||||
shlex.split(None)
|
||||
|
||||
def testSplitPosix(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue