Index: autopilot/trunk/autopilot/add_glider.py =================================================================== --- autopilot/trunk/autopilot/add_glider.py (revision 77) +++ autopilot/trunk/autopilot/add_glider.py (revision 86) @@ -22,12 +22,14 @@ These doctests require write permissions to tests/etc. + Regular configuration file: + + >>> import shutil + >>> from StringIO import StringIO >>> cfg = os.path.join(os.path.dirname(__file__), ... "tests", "etc", "autopilot.cfg") - >>> import shutil >>> shutil.copy2(cfg + ".test", cfg) >>> sys.argv = ["python", ... cfg, ... "Cthulhu"] - >>> from StringIO import StringIO >>> output = StringIO() >>> save = sys.stdout @@ -39,6 +41,16 @@ True >>> output.close() + >>> + >>> import autopilot.list_gliders + >>> sys.argv = ["python", + ... cfg,] + >>> autopilot.list_gliders._main() + ramses + pelagia + salacia + cthulhu """ + num_args = len(sys.argv) - 1 if num_args != 2: Index: autopilot/trunk/autopilot/list_gliders.py =================================================================== --- autopilot/trunk/autopilot/list_gliders.py (revision 83) +++ autopilot/trunk/autopilot/list_gliders.py (revision 86) @@ -31,5 +31,5 @@ ... pass >>> sys.argv = ["python", - ... cfg] + ... cfg,] >>> from StringIO import StringIO >>> output = StringIO() @@ -53,5 +53,5 @@ ... pass >>> sys.argv = ["python", - ... cfg] + ... cfg,] >>> from StringIO import StringIO >>> output = StringIO() @@ -70,5 +70,5 @@ >>> shutil.copy2(cfg + ".test", cfg) >>> sys.argv = ["python", - ... cfg] + ... cfg,] >>> _main() ramses