From: Alberto Berti Date: Sun, 22 Feb 2009 23:43:56 +0000 (-0700) Subject: Added tests for the cse when listdir is an iterator X-Git-Tag: allmydata-tahoe-1.4.0~144 X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/file/URI:LIT:krugkidfnzsc4/index.php?a=commitdiff_plain;h=b945c275c267616a45e3187a14a09df4abff2445;p=tahoe-lafs%2Ftahoe-lafs.git Added tests for the cse when listdir is an iterator --- diff --git a/src/allmydata/test/test_cli.py b/src/allmydata/test/test_cli.py index ac420031..cc3363d0 100644 --- a/src/allmydata/test/test_cli.py +++ b/src/allmydata/test/test_cli.py @@ -991,6 +991,13 @@ class Backup(GridTestMixin, CLITestMixin, StallMixin, unittest.TestCase): ['--exclude-from', excl_filepath + '.no', '--node-url', 'http://ignore.it:2357', 'from', 'to']) + # test that an iterator works too + backup_options = cli.BackupOptions() + backup_options.parseOptions(['--exclude', '*lyx', '--node-url', + 'http://ignore.it:2357', 'from', 'to']) + filtered = list(backup_options.filter_listdir(iter(root_listdir))) + _check_filtering(filtered, root_listdir, ('lib.a', '_darcs', 'subdir'), + ('nice_doc.lyx',)) class Check(GridTestMixin, CLITestMixin, unittest.TestCase):