Changeset 86

Show
Ignore:
Timestamp:
03/22/12 17:19:10
Author:
cbc
Message:

Augmented list-gliders.py doctest.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • autopilot/trunk/autopilot/add_glider.py

    r77 r86  
    2222    These doctests require write permissions to tests/etc. 
    2323 
     24    Regular configuration file: 
     25 
     26    >>> import shutil 
     27    >>> from StringIO import StringIO 
    2428    >>> cfg = os.path.join(os.path.dirname(__file__), 
    2529    ...                    "tests", "etc", "autopilot.cfg") 
    26     >>> import shutil 
    2730    >>> shutil.copy2(cfg + ".test", cfg)     
    2831    >>> sys.argv = ["python", 
    2932    ...             cfg, 
    3033    ...             "Cthulhu"] 
    31     >>> from StringIO import StringIO 
    3234    >>> output = StringIO() 
    3335    >>> save = sys.stdout 
     
    3941    True 
    4042    >>> output.close() 
     43    >>> 
     44    >>> import autopilot.list_gliders 
     45    >>> sys.argv = ["python", 
     46    ...             cfg,] 
     47    >>> autopilot.list_gliders._main() 
     48    ramses 
     49    pelagia 
     50    salacia 
     51    cthulhu 
    4152 
    4253    """ 
     54 
    4355    num_args = len(sys.argv) - 1 
    4456    if num_args != 2: 
  • autopilot/trunk/autopilot/list_gliders.py

    r83 r86  
    3131    ...     pass 
    3232    >>> sys.argv = ["python", 
    33     ...             cfg
     33    ...             cfg,
    3434    >>> from StringIO import StringIO 
    3535    >>> output = StringIO() 
     
    5353    ...     pass 
    5454    >>> sys.argv = ["python", 
    55     ...             cfg
     55    ...             cfg,
    5656    >>> from StringIO import StringIO 
    5757    >>> output = StringIO() 
     
    7070    >>> shutil.copy2(cfg + ".test", cfg) 
    7171    >>> sys.argv = ["python", 
    72     ...             cfg
     72    ...             cfg,
    7373    >>> _main() 
    7474    ramses