summaryrefslogtreecommitdiff
path: root/selftest/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-03-05 03:27:40 +0100
committerJelmer Vernooij <jelmer@samba.org>2012-03-05 03:27:40 +0100
commitd6924f803904d25a7f9cac2ec69f421d7a5bdeab (patch)
tree777b9ce051936e3351b0de83f0b1bc149ffbd393 /selftest/tests
parent1741e6486dbae821aaac8bc4bd52938e4034f870 (diff)
downloadsamba-d6924f803904d25a7f9cac2ec69f421d7a5bdeab.tar.gz
samba-d6924f803904d25a7f9cac2ec69f421d7a5bdeab.tar.bz2
samba-d6924f803904d25a7f9cac2ec69f421d7a5bdeab.zip
selftest.run: Factor out expand_command_list.
Diffstat (limited to 'selftest/tests')
-rw-r--r--selftest/tests/test_run.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/selftest/tests/test_run.py b/selftest/tests/test_run.py
index 040c143895..f7a1dda436 100644
--- a/selftest/tests/test_run.py
+++ b/selftest/tests/test_run.py
@@ -19,7 +19,10 @@
"""Tests for selftest.run."""
-from selftest.run import expand_environment_strings
+from selftest.run import (
+ expand_command_list,
+ expand_environment_strings,
+ )
from selftest.tests import TestCase
@@ -36,3 +39,12 @@ class ExpandEnvironmentStringsTests(TestCase):
def test_unknown(self):
self.assertEquals("foo $BLA",
expand_environment_strings("foo $BLA", {}))
+
+
+class ExpandCommandListTests(TestCase):
+
+ def test_no_list(self):
+ self.assertIs(None, expand_command_list("test bla"))
+
+ def test_list(self):
+ self.assertEquals("test --list", expand_command_list("test $LISTOPT"))