summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-04-05 22:04:38 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-04-05 22:04:38 (GMT)
commitd9e221d232b0ff39babb76e3dea395c5d6e2587b (patch)
treefd19cbd6d1fbf09d2e7fa2c20a69d2bad19f23e5 /Lib/distutils
parentfaa6b121fb34f1c4db36f20b625ece0291396174 (diff)
downloadcpython-d9e221d232b0ff39babb76e3dea395c5d6e2587b.zip
cpython-d9e221d232b0ff39babb76e3dea395c5d6e2587b.tar.gz
cpython-d9e221d232b0ff39babb76e3dea395c5d6e2587b.tar.bz2
added a simplest test to distutils.spawn._nt_quote_args
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/tests/test_spawn.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/Lib/distutils/tests/test_spawn.py b/Lib/distutils/tests/test_spawn.py
new file mode 100644
index 0000000..33e8bcf
--- /dev/null
+++ b/Lib/distutils/tests/test_spawn.py
@@ -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")