本文整理汇总了Python中field.Field.resolve方法的典型用法代码示例。如果您正苦于以下问题:Python Field.resolve方法的具体用法?Python Field.resolve怎么用?Python Field.resolve使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类field.Field
的用法示例。
在下文中一共展示了Field.resolve方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_1st_example_validation
# 需要导入模块: from field import Field [as 别名]
# 或者: from field.Field import resolve [as 别名]
def test_1st_example_validation(self):
test_field = Field('*...\n....\n.*..\n....')
self.assertEquals('*100\n2210\n1*10\n1110', test_field.resolve())
示例2: test_two_rows_with_a_mine
# 需要导入模块: from field import Field [as 别名]
# 或者: from field.Field import resolve [as 别名]
def test_two_rows_with_a_mine(self):
test_field = Field(".\n*")
self.assertEquals("1\n*", test_field.resolve())
示例3: test_two_safe_rows
# 需要导入模块: from field import Field [as 别名]
# 或者: from field.Field import resolve [as 别名]
def test_two_safe_rows(self):
test_field = Field(".\n.")
self.assertEquals("0\n0", test_field.resolve())
示例4: test_two_cells_with_one_bomb
# 需要导入模块: from field import Field [as 别名]
# 或者: from field.Field import resolve [as 别名]
def test_two_cells_with_one_bomb(self):
test_field = Field(".*")
self.assertEquals("1*", test_field.resolve())
示例5: test_two_safe_cases
# 需要导入模块: from field import Field [as 别名]
# 或者: from field.Field import resolve [as 别名]
def test_two_safe_cases(self):
test_field = Field("..")
self.assertEquals("00", test_field.resolve())
示例6: test_add_safe_case
# 需要导入模块: from field import Field [as 别名]
# 或者: from field.Field import resolve [as 别名]
def test_add_safe_case(self):
test_field = Field(".")
self.assertEquals("0", test_field.resolve())