From: Tarek Ziadé Date: Sun, 5 Apr 2009 22:04:38 +0000 (+0000) Subject: added a simplest test to distutils.spawn._nt_quote_args X-Git-Tag: v2.7a1~1546 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9e221d232b0ff39babb76e3dea395c5d6e2587b;p=thirdparty%2FPython%2Fcpython.git added a simplest test to distutils.spawn._nt_quote_args --- diff --git a/Lib/distutils/tests/test_spawn.py b/Lib/distutils/tests/test_spawn.py new file mode 100644 index 000000000000..33e8bcf6e99e --- /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")