本文整理汇总了Python中py65.monitor.Monitor.do_mpu方法的典型用法代码示例。如果您正苦于以下问题:Python Monitor.do_mpu方法的具体用法?Python Monitor.do_mpu怎么用?Python Monitor.do_mpu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类py65.monitor.Monitor
的用法示例。
在下文中一共展示了Monitor.do_mpu方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_mpu_with_bad_arg_gives_error_lists_available_mpus
# 需要导入模块: from py65.monitor import Monitor [as 别名]
# 或者: from py65.monitor.Monitor import do_mpu [as 别名]
def test_mpu_with_bad_arg_gives_error_lists_available_mpus(self):
stdout = StringIO()
mon = Monitor(stdout=stdout)
mon.do_mpu('z80')
lines = stdout.getvalue().splitlines()
self.assertEqual(2, len(lines))
self.assertEqual('Unknown MPU: z80', lines[0])
self.assertTrue(lines[1].startswith('Available MPUs:'))
示例2: test_mpu_selects_65C02
# 需要导入模块: from py65.monitor import Monitor [as 别名]
# 或者: from py65.monitor.Monitor import do_mpu [as 别名]
def test_mpu_selects_65C02(self):
stdout = StringIO()
mon = Monitor(stdout=stdout)
mon.do_mpu('65C02')
lines = stdout.getvalue().splitlines()
self.assertEqual(1, len(lines))
self.assertEqual('Reset with new MPU 65C02', lines[0])
self.assertEqual('65C02', mon._mpu.name)
示例3: test_mpu_with_no_args_prints_current_lists_available_mpus
# 需要导入模块: from py65.monitor import Monitor [as 别名]
# 或者: from py65.monitor.Monitor import do_mpu [as 别名]
def test_mpu_with_no_args_prints_current_lists_available_mpus(self):
stdout = StringIO()
mon = Monitor(stdout=stdout)
mon.do_mpu('')
lines = stdout.getvalue().splitlines()
self.assertEqual(2, len(lines))
self.assertTrue(lines[0].startswith('Current MPU is '))
self.assertTrue(lines[1].startswith('Available MPUs:'))
示例4: test_mpu_select_is_not_case_sensitive
# 需要导入模块: from py65.monitor import Monitor [as 别名]
# 或者: from py65.monitor.Monitor import do_mpu [as 别名]
def test_mpu_select_is_not_case_sensitive(self):
stdout = StringIO()
mon = Monitor(stdout=stdout)
mon.do_mpu('65c02')
self.assertEqual('65C02', mon._mpu.name)