summaryrefslogtreecommitdiff
path: root/Lib/test/test_shlex.py
diff options
context:
space:
mode:
authorGustavo Niemeyer <gustavo@niemeyer.net>2003-04-20 01:57:03 +0000
committerGustavo Niemeyer <gustavo@niemeyer.net>2003-04-20 01:57:03 +0000
commit264fe558dd3503d01707949ef734a9d2c37dcb3a (patch)
tree99dc6929b0bdeac721244fdc460f84d36fa151ec /Lib/test/test_shlex.py
parent4028e7666106193c1c08496be07575710ec033e7 (diff)
downloadcpython-264fe558dd3503d01707949ef734a9d2c37dcb3a.tar.gz
- Changed shlex.split() method to have more useful and
meaningful parameters.
Diffstat (limited to 'Lib/test/test_shlex.py')
-rw-r--r--Lib/test/test_shlex.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/Lib/test/test_shlex.py b/Lib/test/test_shlex.py
index ed0ab47b18..1678c7d3b1 100644
--- a/Lib/test/test_shlex.py
+++ b/Lib/test/test_shlex.py
@@ -151,9 +151,9 @@ class ShlexTest(unittest.TestCase):
for item in self.posix_data:
item[0] = item[0].replace(r"\n", "\n")
- def splitTest(self, data, posix, spaces):
+ def splitTest(self, data, comments):
for i in range(len(data)):
- l = shlex.split(data[i][0], posix=posix, spaces=spaces)
+ l = shlex.split(data[i][0], comments=comments)
self.assertEqual(l, data[i][1:],
"%s: %s != %s" %
(data[i][0], l, data[i][1:]))
@@ -167,13 +167,9 @@ class ShlexTest(unittest.TestCase):
tok = lex.get_token()
return ret
- def testSplit(self):
- """Test data splitting with non-posix parser"""
- self.splitTest(self.data, posix=0, spaces=0)
-
def testSplitPosix(self):
"""Test data splitting with posix parser"""
- self.splitTest(self.posix_data, posix=1, spaces=1)
+ self.splitTest(self.posix_data, comments=True)
def testCompat(self):
"""Test compatibility interface"""