You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(13) |
Jul
(13) |
Aug
(17) |
Sep
|
Oct
(9) |
Nov
(1) |
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
|
Feb
|
Mar
|
Apr
(27) |
May
(10) |
Jun
(6) |
Jul
(1) |
Aug
(3) |
Sep
(6) |
Oct
|
Nov
(1) |
Dec
|
2004 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(9) |
Jun
(26) |
Jul
(23) |
Aug
(2) |
Sep
(7) |
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: David G. <go...@us...> - 2002-06-11 01:56:49
|
Update of /cvsroot/optik/optik/test In directory usw-pr-cvs1:/tmp/cvs-serv13111/optik/test Modified Files: test_basics.py Log Message: Added test for OptionParser.get_default_values(). (Time to convert to PyUnit?) Index: test_basics.py =================================================================== RCS file: /cvsroot/optik/optik/test/test_basics.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_basics.py 11 Apr 2002 19:11:34 -0000 1.3 --- test_basics.py 11 Jun 2002 01:56:46 -0000 1.4 *************** *** 21,24 **** --- 21,28 ---- print "ok: 1" + defaults = parser.get_default_values() + assert vars(defaults) == vars(values) + print "ok: 2" + args = ["-a"] try: *************** *** 26,30 **** except SystemExit, err: assert err.args[0].endswith("-a option requires a value"), err.args[0] ! print "ok: 2" else: print "not ok" --- 30,34 ---- except SystemExit, err: assert err.args[0].endswith("-a option requires a value"), err.args[0] ! print "ok: 3" else: print "not ok" *************** *** 35,39 **** 'foo': ["blah", ""]}, vars(values) assert args == [] ! print "ok: 3" (values, args) = parser.parse_args(["--foo", "bar", "--foo", "", "--foo=x"]) --- 39,43 ---- 'foo': ["blah", ""]}, vars(values) assert args == [] ! print "ok: 4" (values, args) = parser.parse_args(["--foo", "bar", "--foo", "", "--foo=x"]) *************** *** 42,46 **** 'foo': ["bar", "", "x"]}, vars(values) assert args == [] ! print "ok: 4" args = ["-abc"] --- 46,50 ---- 'foo': ["bar", "", "x"]}, vars(values) assert args == [] ! print "ok: 5" args = ["-abc"] *************** *** 50,54 **** 'foo': None}, vars(values) assert args == [] ! print "ok: 5" args = ["-a", "34"] --- 54,58 ---- 'foo': None}, vars(values) assert args == [] ! print "ok: 6" args = ["-a", "34"] *************** *** 58,62 **** 'foo': None}, vars(values) assert args == [] ! print "ok: 6" args = ["-b34"] --- 62,66 ---- 'foo': None}, vars(values) assert args == [] ! print "ok: 7" args = ["-b34"] *************** *** 66,70 **** 'foo': None}, vars(values) assert args == [] ! print "ok: 7" args = ["-b", "-5"] --- 70,74 ---- 'foo': None}, vars(values) assert args == [] ! print "ok: 8" args = ["-b", "-5"] *************** *** 74,78 **** 'foo': None}, vars(values) assert args == [] ! print "ok: 8" args = ["-b", "5x"] --- 78,82 ---- 'foo': None}, vars(values) assert args == [] ! print "ok: 9" args = ["-b", "5x"] *************** *** 82,86 **** assert err.args[0].endswith("option -b: invalid integer value: '5x'"), \ err.args[0] ! print "ok: 9" else: print "not ok" --- 86,90 ---- assert err.args[0].endswith("option -b: invalid integer value: '5x'"), \ err.args[0] ! print "ok: 10" else: print "not ok" *************** *** 91,95 **** 'foo': None} assert args == [] ! print "ok: 10" (values, args) = parser.parse_args(["--boo", "111"]) --- 95,99 ---- 'foo': None} assert args == [] ! print "ok: 11" (values, args) = parser.parse_args(["--boo", "111"]) *************** *** 98,102 **** 'foo': None} assert args == [] ! print "ok: 11" try: --- 102,106 ---- 'foo': None} assert args == [] ! print "ok: 12" try: *************** *** 104,108 **** except SystemExit, err: assert err.args[0].endswith("no such option: --boo13"), err.args[0] ! print "ok: 12" else: print "not ok" --- 108,112 ---- except SystemExit, err: assert err.args[0].endswith("no such option: --boo13"), err.args[0] ! print "ok: 13" else: print "not ok" *************** *** 113,117 **** assert err.args[0].endswith("option --boo: invalid integer value: 'x5'"), \ err.args[0] ! print "ok: 13" else: print "not ok" --- 117,121 ---- assert err.args[0].endswith("option --boo: invalid integer value: 'x5'"), \ err.args[0] ! print "ok: 14" else: print "not ok" *************** *** 122,126 **** assert values.boo is None assert args == [] ! print "ok: 14" (values, args) = parser.parse_args(["--f=bar", "-axyz"]) --- 126,130 ---- assert values.boo is None assert args == [] ! print "ok: 15" (values, args) = parser.parse_args(["--f=bar", "-axyz"]) *************** *** 129,133 **** assert values.boo is None assert args == [] ! print "ok: 15" parser.add_option("--foz", action="store", type="string", dest="foo") --- 133,137 ---- assert values.boo is None assert args == [] ! print "ok: 16" parser.add_option("--foz", action="store", type="string", dest="foo") *************** *** 135,144 **** parser.parse_args(["--f=bar"]) except SystemExit, err: ! assert err.args[0].endswith("ambiguous option: --f (--foo, --foz, ...?)"),\ err.args[0] ! print "ok: 16" else: print "not ok" - (values, args) = parser.parse_args(["-a", "xyz", "--foo", "bar"]) --- 139,147 ---- parser.parse_args(["--f=bar"]) except SystemExit, err: ! assert err.args[0].find("ambiguous option: --f (") != -1,\ err.args[0] ! print "ok: 17" else: print "not ok" (values, args) = parser.parse_args(["-a", "xyz", "--foo", "bar"]) *************** *** 147,151 **** assert values.boo is None assert args == [] ! print "ok: 17" (values, args) = parser.parse_args(["--foo=bar", "-b", "123", "--foo", "baz"]) --- 150,154 ---- assert values.boo is None assert args == [] ! print "ok: 18" (values, args) = parser.parse_args(["--foo=bar", "-b", "123", "--foo", "baz"]) *************** *** 154,158 **** assert values.boo == 123, `values.boo` assert args == [] ! print "ok: 18" (values, args) = parser.parse_args(["-a", "foo", "bar"]) --- 157,161 ---- assert values.boo == 123, `values.boo` assert args == [] ! print "ok: 19" (values, args) = parser.parse_args(["-a", "foo", "bar"]) *************** *** 161,165 **** 'foo': None} assert args == ["bar"] ! print "ok: 19" --- 164,168 ---- 'foo': None} assert args == ["bar"] ! print "ok: 20" *************** *** 169,173 **** 'foo': None} assert args == ["foo", "bar"] ! print "ok: 20" (values, args) = parser.parse_args(["-ab", "--", "--foo", "bar"]) --- 172,176 ---- 'foo': None} assert args == ["foo", "bar"] ! print "ok: 21" (values, args) = parser.parse_args(["-ab", "--", "--foo", "bar"]) *************** *** 176,180 **** 'foo': None} assert args == ["--foo", "bar"], args ! print "ok: 21" (values, args) = parser.parse_args(["-ab", "-", "--foo", "bar"]) --- 179,183 ---- 'foo': None} assert args == ["--foo", "bar"], args ! print "ok: 22" (values, args) = parser.parse_args(["-ab", "-", "--foo", "bar"]) *************** *** 183,187 **** 'foo': ["bar"]} assert args == ["-"] ! print "ok: 22" args = ["-b3", "-b", "5", "--foo=bar", "--foo", "baz"] --- 186,190 ---- 'foo': ["bar"]} assert args == ["-"] ! print "ok: 23" args = ["-b3", "-b", "5", "--foo=bar", "--foo", "baz"] *************** *** 191,195 **** 'foo': ["bar", "baz"]} assert args == [] ! print "ok: 23" (values, args) = parser.parse_args(["-a", "-b3"]) --- 194,198 ---- 'foo': ["bar", "baz"]} assert args == [] ! print "ok: 24" (values, args) = parser.parse_args(["-a", "-b3"]) *************** *** 198,201 **** 'foo': None} assert args == [] ! print "ok: 24" ! --- 201,203 ---- 'foo': None} assert args == [] ! print "ok: 25" |
From: David G. <go...@us...> - 2002-06-11 01:53:38
|
Update of /cvsroot/optik/optik/lib In directory usw-pr-cvs1:/tmp/cvs-serv11993/optik/lib Modified Files: option_parser.py Log Message: new method: OptionParser.get_default_values (patch 565643) Index: option_parser.py =================================================================== RCS file: /cvsroot/optik/optik/lib/option_parser.py,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** option_parser.py 7 Jun 2002 22:42:49 -0000 1.35 --- option_parser.py 11 Jun 2002 01:53:35 -0000 1.36 *************** *** 229,232 **** --- 229,235 ---- self.defaults.update(kwargs) + def get_default_values(self): + return Values(self.defaults) + # -- Option-adding methods ----------------------------------------- *************** *** 345,349 **** rargs = self._get_args(args) if values is None: ! values = Values(self.defaults) # Store the halves of the argument list as attributes for the --- 348,352 ---- rargs = self._get_args(args) if values is None: ! values = self.get_default_values() # Store the halves of the argument list as attributes for the |
From: David G. <go...@us...> - 2002-06-08 02:06:07
|
Update of /cvsroot/optik/CVSROOT In directory usw-pr-cvs1:/tmp/cvs-serv28062 Modified Files: loginfo Log Message: trivial change to test syncmail Index: loginfo =================================================================== RCS file: /cvsroot/optik/CVSROOT/loginfo,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** loginfo 8 Jun 2002 02:05:26 -0000 1.2 --- loginfo 8 Jun 2002 02:06:04 -0000 1.3 *************** *** 25,27 **** --- 25,28 ---- # or #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog + DEFAULT $CVSROOT/CVSROOT/syncmail %{sVv} opt...@li... |