+
+
+class ExpandCommandRunTests(TestCase):
+
+ def test_idlist(self):
+ self.assertEquals(("test foo bar", None),
+ expand_command_run("test", False, True, subtests=["foo", "bar"]))
+
+ def test_idlist_all(self):
+ self.assertEquals(("test", None),
+ expand_command_run("test", False, True))
+
+ def test_loadlist(self):
+ (cmd, tmpf) = expand_command_run("test $LOADLIST", True, False,
+ subtests=["foo", "bar"])
+ self.addCleanup(os.remove, tmpf)
+ f = open(tmpf, 'r')
+ try:
+ self.assertEquals(f.read(), "foo\nbar\n")
+ finally:
+ f.close()
+ self.assertEquals("test --load-list=%s" % tmpf, cmd)
+
+ def test_loadlist_all(self):
+ self.assertEquals(("test ", None),
+ expand_command_run("test $LOADLIST", True, False))