本文整理汇总了Python中server.Server.stored_previous_partial方法的典型用法代码示例。如果您正苦于以下问题:Python Server.stored_previous_partial方法的具体用法?Python Server.stored_previous_partial怎么用?Python Server.stored_previous_partial使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类server.Server
的用法示例。
在下文中一共展示了Server.stored_previous_partial方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_slice_line
# 需要导入模块: from server import Server [as 别名]
# 或者: from server.Server import stored_previous_partial [as 别名]
def test_slice_line(self):
print "::test_slice_line starts ..."
sv = Server()
sv.stored_previous_partial = "cuu"
sv.prepared_line = "p B"
sv.slice_line()
self.assertEquals("cuu", sv.sm.slice_result[0])
示例2: test_handle_package
# 需要导入模块: from server import Server [as 别名]
# 或者: from server.Server import stored_previous_partial [as 别名]
def test_handle_package(self):
print "::test_handle_package starts ..."
sv = Server()
sv.stored_previous_partial = "cuu"
sv.prepared_line = "p B"
sv.parse_line(sv.prepared_line)
sv.handle_package()
self.assertEquals("p", sv.sm.new_partial)
self.assertEquals("cuu", sv.sm.slice_result[0])
self.assertEquals("cuu", sv.sm.cutted)
示例3: test_update_machine_data_before_slice
# 需要导入模块: from server import Server [as 别名]
# 或者: from server.Server import stored_previous_partial [as 别名]
def test_update_machine_data_before_slice(self):
print "::test_update_machine_data_before_slice starts ..."
sv = Server()
sv.stored_previous_partial = "cuu"
sv.prepared_line = "p B"
sv.parse_line(sv.prepared_line)
sv.take_machine()
sv.update_machine_data_before_slice()
self.assertEquals("cuu", sv.sm.previous_partial)
# self.assertEquals('cuu', sv.sm.previous_partial)
self.assertTrue(isinstance(sv.sm, SliceMachine1))
self.assertRaises(KeyError, self.raise_smKeyError)
示例4: test_sm_do_slice
# 需要导入模块: from server import Server [as 别名]
# 或者: from server.Server import stored_previous_partial [as 别名]
def test_sm_do_slice(self):
print "::test_sm_do_slice starts ..."
sv = Server()
sv.stored_previous_partial = "cuu"
sv.prepared_line = "p B"
sv.parse_line(sv.prepared_line)
sv.take_machine()
sv.update_machine_data_before_slice()
sv.sm.do_slice()
self.assertEquals("cuu", sv.sm.previous_partial)
self.assertTrue(isinstance(sv.sm, SliceMachine1))
self.assertEquals("p", sv.sm.new_partial)
self.assertEquals("cuu", sv.sm.cutted)