本文整理汇总了Python中cell.Cell.set_cell_visibility方法的典型用法代码示例。如果您正苦于以下问题:Python Cell.set_cell_visibility方法的具体用法?Python Cell.set_cell_visibility怎么用?Python Cell.set_cell_visibility使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cell.Cell
的用法示例。
在下文中一共展示了Cell.set_cell_visibility方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TestCell
# 需要导入模块: from cell import Cell [as 别名]
# 或者: from cell.Cell import set_cell_visibility [as 别名]
class TestCell(unittest.TestCase):
def setUp(self):
self.cell = Cell(6, True, "B", 3)
def test_cell_can_set_new_value(self):
other_cell = Cell(5, True, "A", 0)
self.assertEqual(other_cell.value, 5)
def test_verify_if_status_can_updated(self):
self.cell.set_cell_visibility(False)
self.assertFalse(self.cell.get_cell_visibility())
def test_set_the_cell_as_hide(self):
self.cell.set_cell_visibility(False)
self.assertFalse(self.cell.get_cell_visibility())
def test_values_map_of_cell_are_correct(self):
self.assertEqual(self.cell.row, "B")
self.assertEqual(self.cell.column, 3)
def test_the_value_returned_is_correct(self):
cell = Cell(5, True, "A", 0)
self.assertEqual(cell.get_cell_value(), 5)
def test_verify_the_position_set_with_new_value_in_cell_object(self):
self.cell.set_cell_value(8)
self.assertEqual(self.cell.get_cell_value(), 8)
def test_the_values_referenced_for_each_cell_are_set_correctly(self):
self.cell.set_map("C", 2)
self.assertEqual(self.cell.row, "C")
self.assertEqual(self.cell.column, 2)