Commit 4b4a73c9 authored by ben's avatar ben

Updated to cohere with new ParseArgs syntax


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@94 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent eecd0af2
...@@ -203,11 +203,11 @@ testfiles/select/1/1 ...@@ -203,11 +203,11 @@ testfiles/select/1/1
class ParseArgsTest(unittest.TestCase): class ParseArgsTest(unittest.TestCase):
"""Test argument parsing""" """Test argument parsing"""
def ParseTest(self, tuplelist, indicies): def ParseTest(self, tuplelist, indicies, filelists = []):
"""No error if running select on tuple goes over indicies""" """No error if running select on tuple goes over indicies"""
self.root = DSRPath(1, Globals.local_connection, "testfiles/select") self.root = DSRPath(1, Globals.local_connection, "testfiles/select")
self.Select = Select(self.root) self.Select = Select(self.root)
self.Select.ParseArgs(tuplelist) self.Select.ParseArgs(tuplelist, filelists)
self.Select.set_iter() self.Select.set_iter()
assert Iter.equal(Iter.map(lambda dsrp: dsrp.index, self.Select), assert Iter.equal(Iter.map(lambda dsrp: dsrp.index, self.Select),
iter(indicies), verbose = 1) iter(indicies), verbose = 1)
...@@ -262,7 +262,7 @@ class ParseArgsTest(unittest.TestCase): ...@@ -262,7 +262,7 @@ class ParseArgsTest(unittest.TestCase):
self.root = DSRPath(1, Globals.local_connection, "testfiles/select") self.root = DSRPath(1, Globals.local_connection, "testfiles/select")
self.Select = Select(self.root) self.Select = Select(self.root)
self.Select.ParseArgs([("--include", "testfiles/select/1/1"), self.Select.ParseArgs([("--include", "testfiles/select/1/1"),
("--exclude", "**")]) ("--exclude", "**")], [])
self.Select.set_iter(('1', '1')) self.Select.set_iter(('1', '1'))
assert Iter.equal(Iter.map(lambda dsrp: dsrp.index, self.Select), assert Iter.equal(Iter.map(lambda dsrp: dsrp.index, self.Select),
iter([("1", '1', '1'), iter([("1", '1', '1'),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment