From d9e221d232b0ff39babb76e3dea395c5d6e2587b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 5 Apr 2009 22:04:38 +0000 Subject: [PATCH] added a simplest test to distutils.spawn._nt_quote_args --- Lib/distutils/tests/test_spawn.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Lib/distutils/tests/test_spawn.py diff --git a/Lib/distutils/tests/test_spawn.py b/Lib/distutils/tests/test_spawn.py new file mode 100644 index 0000000000..33e8bcf6e9 --- /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") -- 2.50.1