|
3 | 3 | import shlex
|
4 | 4 | import string
|
5 | 5 | import unittest
|
6 |
| -from unittest import mock |
7 | 6 |
|
8 | 7 |
|
9 | 8 | # The original test data set was from shellwords, by Hartmut Goebel.
|
@@ -162,18 +161,17 @@ def oldSplit(self, s):
|
162 | 161 | tok = lex.get_token()
|
163 | 162 | return ret
|
164 | 163 |
|
165 |
| - @mock.patch('sys.stdin', io.StringIO()) |
166 |
| - def testSplitNoneDeprecation(self): |
167 |
| - with self.assertWarns(DeprecationWarning): |
| 164 | + def testSplitNone(self): |
| 165 | + with self.assertRaises(ValueError): |
168 | 166 | shlex.split(None)
|
169 | 167 |
|
170 |
| - # TODO: RUSTPYTHON |
| 168 | + # TODO: RUSTPYTHON; ValueError: Error Retrieving Value |
171 | 169 | @unittest.expectedFailure
|
172 | 170 | def testSplitPosix(self):
|
173 | 171 | """Test data splitting with posix parser"""
|
174 | 172 | self.splitTest(self.posix_data, comments=True)
|
175 | 173 |
|
176 |
| - # TODO: RUSTPYTHON |
| 174 | + # TODO: RUSTPYTHON; ValueError: Error Retrieving Value |
177 | 175 | @unittest.expectedFailure
|
178 | 176 | def testCompat(self):
|
179 | 177 | """Test compatibility interface"""
|
@@ -315,7 +313,7 @@ def testEmptyStringHandling(self):
|
315 | 313 | s = shlex.shlex("'')abc", punctuation_chars=True)
|
316 | 314 | self.assertEqual(list(s), expected)
|
317 | 315 |
|
318 |
| - # TODO: RUSTPYTHON |
| 316 | + # TODO: RUSTPYTHON; ValueError: Error Retrieving Value |
319 | 317 | @unittest.expectedFailure
|
320 | 318 | def testUnicodeHandling(self):
|
321 | 319 | """Test punctuation_chars and whitespace_split handle unicode."""
|
@@ -356,7 +354,7 @@ def testJoin(self):
|
356 | 354 | joined = shlex.join(split_command)
|
357 | 355 | self.assertEqual(joined, command)
|
358 | 356 |
|
359 |
| - # TODO: RUSTPYTHON |
| 357 | + # TODO: RUSTPYTHON; ValueError: Error Retrieving Value |
360 | 358 | @unittest.expectedFailure
|
361 | 359 | def testJoinRoundtrip(self):
|
362 | 360 | all_data = self.data + self.posix_data
|
|
0 commit comments