diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-09-29 15:13:27 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-09-29 15:13:27 (GMT) |
commit | 56b143d7580b06a4e6bd4d5e16a5ba1cff45f534 (patch) | |
tree | 9d36a804f88d5c1c6c7c317d01deb94d97582496 /Lib | |
parent | cc6ef3620fd368b639540ff4c2d92d7e84fc1f6b (diff) | |
download | cpython-56b143d7580b06a4e6bd4d5e16a5ba1cff45f534.zip cpython-56b143d7580b06a4e6bd4d5e16a5ba1cff45f534.tar.gz cpython-56b143d7580b06a4e6bd4d5e16a5ba1cff45f534.tar.bz2 |
condense two tests with the same name (closes #19114)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/distutils/tests/test_cmd.py | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/Lib/distutils/tests/test_cmd.py b/Lib/distutils/tests/test_cmd.py index 195045c..cf5197c 100644 --- a/Lib/distutils/tests/test_cmd.py +++ b/Lib/distutils/tests/test_cmd.py @@ -34,6 +34,18 @@ class CommandTestCase(unittest.TestCase): self.assertRaises(DistutilsOptionError, cmd.ensure_string_list, 'not_string_list2') + cmd.option1 = 'ok,dok' + cmd.ensure_string_list('option1') + self.assertEqual(cmd.option1, ['ok', 'dok']) + + cmd.option2 = ['xxx', 'www'] + cmd.ensure_string_list('option2') + + cmd.option3 = ['ok', 2] + self.assertRaises(DistutilsOptionError, cmd.ensure_string_list, + 'option3') + + def test_make_file(self): cmd = self.cmd @@ -77,19 +89,6 @@ class CommandTestCase(unittest.TestCase): cmd.option3 = 1 self.assertRaises(DistutilsOptionError, cmd.ensure_string, 'option3') - def test_ensure_string_list(self): - cmd = self.cmd - cmd.option1 = 'ok,dok' - cmd.ensure_string_list('option1') - self.assertEqual(cmd.option1, ['ok', 'dok']) - - cmd.option2 = ['xxx', 'www'] - cmd.ensure_string_list('option2') - - cmd.option3 = ['ok', 2] - self.assertRaises(DistutilsOptionError, cmd.ensure_string_list, - 'option3') - def test_ensure_filename(self): cmd = self.cmd cmd.option1 = __file__ |