Changeset 86
- Timestamp:
- 03/22/12 17:19:10
- Files:
-
- autopilot/trunk/autopilot/add_glider.py (modified) (2 diffs)
- autopilot/trunk/autopilot/list_gliders.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
autopilot/trunk/autopilot/add_glider.py
r77 r86 22 22 These doctests require write permissions to tests/etc. 23 23 24 Regular configuration file: 25 26 >>> import shutil 27 >>> from StringIO import StringIO 24 28 >>> cfg = os.path.join(os.path.dirname(__file__), 25 29 ... "tests", "etc", "autopilot.cfg") 26 >>> import shutil27 30 >>> shutil.copy2(cfg + ".test", cfg) 28 31 >>> sys.argv = ["python", 29 32 ... cfg, 30 33 ... "Cthulhu"] 31 >>> from StringIO import StringIO32 34 >>> output = StringIO() 33 35 >>> save = sys.stdout … … 39 41 True 40 42 >>> 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 41 52 42 53 """ 54 43 55 num_args = len(sys.argv) - 1 44 56 if num_args != 2: autopilot/trunk/autopilot/list_gliders.py
r83 r86 31 31 ... pass 32 32 >>> sys.argv = ["python", 33 ... cfg ]33 ... cfg,] 34 34 >>> from StringIO import StringIO 35 35 >>> output = StringIO() … … 53 53 ... pass 54 54 >>> sys.argv = ["python", 55 ... cfg ]55 ... cfg,] 56 56 >>> from StringIO import StringIO 57 57 >>> output = StringIO() … … 70 70 >>> shutil.copy2(cfg + ".test", cfg) 71 71 >>> sys.argv = ["python", 72 ... cfg ]72 ... cfg,] 73 73 >>> _main() 74 74 ramses