From 65cb6928100669e457cf75005c184fbd21aee265 Mon Sep 17 00:00:00 2001 From: Padraic Fanning Date: Mon, 17 Jan 2022 11:13:36 -0500 Subject: [PATCH] Update test_shlex.py to CPython 3.9 --- Lib/test/test_shlex.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_shlex.py b/Lib/test/test_shlex.py index 7933f2e80..f01677250 100644 --- a/Lib/test/test_shlex.py +++ b/Lib/test/test_shlex.py @@ -3,7 +3,7 @@ import itertools import shlex import string import unittest - +from unittest import mock # The original test data set was from shellwords, by Hartmut Goebel. @@ -162,6 +162,11 @@ class ShlexTest(unittest.TestCase): tok = lex.get_token() return ret + @mock.patch('sys.stdin', io.StringIO()) + def testSplitNoneDeprecation(self): + with self.assertWarns(DeprecationWarning): + shlex.split(None) + # TODO: RUSTPYTHON @unittest.expectedFailure def testSplitPosix(self):