1
0
mirror of https://github.com/mnaberez/py65.git synced 2024-06-06 20:29:34 +00:00

Fix help_cd() to not raise an exception

This commit is contained in:
Mike Naberezny 2012-02-03 20:23:37 -08:00
parent 60454197fe
commit f3034082c9
3 changed files with 14 additions and 1 deletions

View File

@ -1,5 +1,8 @@
0.12-dev *Next Release*
- Fixed a bug that caused ``help cd`` to raise an exception
in the monitor.
0.11 (2012-01-07)
- Added a new 65Org16 MPU simulation written by Ed Spittles.

View File

@ -452,7 +452,7 @@ class Monitor(cmd.Cmd):
except KeyError, why:
self._output(why[0])
def help_cd(self, args):
def help_cd(self):
self._output("cd <directory>")
self._output("Change the working directory.")

View File

@ -139,6 +139,16 @@ class MonitorTests(unittest.TestCase):
out = stdout.getvalue()
self.assertTrue(out.startswith("assemble <address>"))
# cd
def test_help_cd(self):
stdout = StringIO()
mon = Monitor(stdout=stdout)
mon.help_cd()
out = stdout.getvalue()
self.assertTrue(out.startswith("cd <directory>"))
# delete_label
def test_shortcut_for_delete_label(self):