add test for CommandOutputSet
authorAlec Warner <antarus@gentoo.org>
Sun, 22 Jul 2007 22:17:12 +0000 (22:17 -0000)
committerAlec Warner <antarus@gentoo.org>
Sun, 22 Jul 2007 22:17:12 +0000 (22:17 -0000)
svn path=/main/trunk/; revision=7360

pym/portage/tests/sets/__init__.py [new file with mode: 0644]
pym/portage/tests/sets/shell/__init__.py [new file with mode: 0644]
pym/portage/tests/sets/shell/testShell.py [new file with mode: 0644]

diff --git a/pym/portage/tests/sets/__init__.py b/pym/portage/tests/sets/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/pym/portage/tests/sets/shell/__init__.py b/pym/portage/tests/sets/shell/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/pym/portage/tests/sets/shell/testShell.py b/pym/portage/tests/sets/shell/testShell.py
new file mode 100644 (file)
index 0000000..cc0a1bb
--- /dev/null
@@ -0,0 +1,26 @@
+# testCommandOututSet.py -- Portage Unit Testing Functionality
+# Copyright 2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+from portage.tests import TestCase, test_cps
+from portage.sets.shell import CommandOutputSet
+
+class CommandOutputSetTestCase(TestCase):
+       """Simple Test Case for CommandOutputSet"""
+
+       def setUp(self):
+               pass
+
+       def tearDown(self):
+               pass
+
+       def testCommand(self):
+               
+               input = set(test_cps)
+               command = "/usr/bin/echo -e "
+               for a in input:
+                 command += "\"%s\n\"" % a
+               s = CommandOutputSet('testset', command)
+               atoms = s.getAtoms()
+               self.assertEqual(atoms, input)