]> granicus.if.org Git - python/commitdiff
added a simplest test to distutils.spawn._nt_quote_args
authorTarek Ziadé <ziade.tarek@gmail.com>
Sun, 5 Apr 2009 22:04:38 +0000 (22:04 +0000)
committerTarek Ziadé <ziade.tarek@gmail.com>
Sun, 5 Apr 2009 22:04:38 +0000 (22:04 +0000)
Lib/distutils/tests/test_spawn.py [new file with mode: 0644]

diff --git a/Lib/distutils/tests/test_spawn.py b/Lib/distutils/tests/test_spawn.py
new file mode 100644 (file)
index 0000000..33e8bcf
--- /dev/null
@@ -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")