mirror of
https://github.com/python/cpython.git
synced 2025-08-21 17:25:34 +00:00
added a simplest test to distutils.spawn._nt_quote_args
This commit is contained in:
parent
faa6b121fb
commit
d9e221d232
1 changed files with 20 additions and 0 deletions
20
Lib/distutils/tests/test_spawn.py
Normal file
20
Lib/distutils/tests/test_spawn.py
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
"""Tests for distutils.spawn."""
|
||||||
|
import unittest
|
||||||
|
from distutils.spawn import _nt_quote_args
|
||||||
|
|
||||||
|
class SpawnTestCase(unittest.TestCase):
|
||||||
|
|
||||||
|
def test_nt_quote_args(self):
|
||||||
|
|
||||||
|
for (args, wanted) in ((['with space', 'nospace'],
|
||||||
|
['"with space"', 'nospace']),
|
||||||
|
(['nochange', 'nospace'],
|
||||||
|
['nochange', 'nospace'])):
|
||||||
|
res = _nt_quote_args(args)
|
||||||
|
self.assertEquals(res, wanted)
|
||||||
|
|
||||||
|
def test_suite():
|
||||||
|
return unittest.makeSuite(SpawnTestCase)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main(defaultTest="test_suite")
|
Loading…
Add table
Add a link
Reference in a new issue