def cell_size_test(): b = Board(4, 9) _value = (34, 55) b.cell_size = _value assert b.cell_size[0] == _value[0] assert b.cell_size[1] == _value[1] b._setupUI() assert b.cell_size[0] == _value[0] assert b.cell_size[1] == _value[1] b.on_timer = lambda: b.close() b.start_timer(TIME_TO_CLOSE) b.show() assert b.cell_size[0] == _value[0] assert b.cell_size[1] == _value[1] b2 = Board(42, 99) _value = 1 b2.cell_size = _value assert b2.cell_size[0] == _value assert b2.cell_size[1] == _value b2._setupUI() assert b2.cell_size[0] == _value assert b2.cell_size[1] == _value b2.on_timer = lambda: b.close() b2.start_timer(TIME_TO_CLOSE) b2.show() assert b2.cell_size[0] == _value assert b2.cell_size[1] == _value
def test_cell_size(self): b = Board(4, 9) _value = (34, 55) b.cell_size = _value self.assertEqual(b.cell_size[0], _value[0]) self.assertEqual(b.cell_size[1], _value[1]) b._setupUI() self.assertEqual(b.cell_size[0], _value[0]) self.assertEqual(b.cell_size[1], _value[1]) b.on_timer = lambda: b.close() b.start_timer(TIME_TO_CLOSE) b.show() self.assertEqual(b.cell_size[0], _value[0]) self.assertEqual(b.cell_size[1], _value[1]) b2 = Board(42, 99) _value = 1 b2.cell_size = _value self.assertEqual(b2.cell_size[0], _value) self.assertEqual(b2.cell_size[1], _value) b2._setupUI() self.assertEqual(b2.cell_size[0], _value) self.assertEqual(b2.cell_size[1], _value) b2.on_timer = lambda: b.close() b2.start_timer(TIME_TO_CLOSE) b2.show() self.assertEqual(b2.cell_size[0], _value) self.assertEqual(b2.cell_size[1], _value)
def test_size(self): b = Board(3, 5) self.assertEqual(b.nrows, 3) self.assertEqual(b.ncols, 5) self.assertEqual(b.size, 15) b._setupUI() self.assertEqual(b.nrows, 3) self.assertEqual(b.ncols, 5) self.assertEqual(b.size, 15)
def size_test(): b = Board(3, 5) assert b.nrows == 3 assert b.ncols == 5 assert b.size == 15 b._setupUI() assert b.nrows == 3 assert b.ncols == 5 assert b.size == 15
def margin_color_test(): b = Board(10, 10) _value = "dark gray" b.margin_color = _value assert b.margin_color == _value b._setupUI() assert b.margin_color == _value b.on_timer = lambda: b.close() b.start_timer(TIME_TO_CLOSE) b.show() assert b.margin_color == _value
def cell_spacing_test(): b = Board(1, 1) _value = 7 b.cell_spacing = _value assert b.cell_spacing == _value b._setupUI() assert b.cell_spacing == _value b.on_timer = lambda: b.close() b.start_timer(TIME_TO_CLOSE) b.show() assert b.cell_spacing == _value
def margin_test(): b = Board(7, 1) _value = 19 b.margin = _value assert b.margin == _value b._setupUI() assert b.margin == _value b.on_timer = lambda: b.close() b.start_timer(TIME_TO_CLOSE) b.show() assert b.margin == _value
def cursor_test(): b = Board(1, 20) _value = "watch" b.cursor = _value assert b.cursor == _value b._setupUI() assert b.cursor == _value b.on_timer = lambda: b.close() b.start_timer(TIME_TO_CLOSE) b.show() assert b.cursor == _value
def grid_color_test(): b = Board(4, 9) _value = "magenta" b.grid_color = _value assert b.grid_color == _value b._setupUI() assert b.grid_color == _value b.on_timer = lambda: b.close() b.start_timer(TIME_TO_CLOSE) b.show() assert b.grid_color == _value
def test_grid_color(self): b = Board(4, 9) _value = "magenta" b.grid_color = _value self.assertEqual(b.grid_color, _value) b._setupUI() self.assertEqual(b.grid_color, _value) b.on_timer = lambda: b.close() b.start_timer(TIME_TO_CLOSE) b.show() self.assertEqual(b.grid_color, _value)
def cell_color_test(): b = Board(4, 9) _value = "#000fff000" b.cell_color = _value assert b.cell_color == _value b._setupUI() assert b.cell_color == _value b.on_timer = lambda: b.close() b.start_timer(TIME_TO_CLOSE) b.show() assert b.cell_color == _value
def test_margin_color(self): b = Board(10, 10) _value = "dark gray" b.margin_color = _value self.assertEqual(b.margin_color, _value) b._setupUI() self.assertEqual(b.margin_color, _value) b.on_timer = lambda: b.close() b.start_timer(TIME_TO_CLOSE) b.show() self.assertEqual(b.margin_color, _value)
def test_cell_color(self): b = Board(4, 9) _value = "#000fff000" b.cell_color = _value self.assertEqual(b.cell_color, _value) b._setupUI() self.assertEqual(b.cell_color, _value) b.on_timer = lambda: b.close() b.start_timer(TIME_TO_CLOSE) b.show() self.assertEqual(b.cell_color, _value)
def test_cell_spacing(self): b = Board(1, 1) _value = 7 b.cell_spacing = _value self.assertEqual(b.cell_spacing, _value) b._setupUI() self.assertEqual(b.cell_spacing, _value) b.on_timer = lambda: b.close() b.start_timer(TIME_TO_CLOSE) b.show() self.assertEqual(b.cell_spacing, _value)
def test_margin(self): b = Board(7, 1) _value = 19 b.margin = _value self.assertEqual(b.margin, _value) b._setupUI() self.assertEqual(b.margin, _value) b.on_timer = lambda: b.close() b.start_timer(TIME_TO_CLOSE) b.show() self.assertEqual(b.margin, _value)
def test_cursor(self): b = Board(1, 20) _value = "watch" b.cursor = _value self.assertEqual(b.cursor, _value) b._setupUI() self.assertEqual(b.cursor, _value) b.on_timer = lambda: b.close() b.start_timer(TIME_TO_CLOSE) b.show() self.assertEqual(b.cursor, _value)
def title_test(): b = Board(2, 2) _value = "qwertyu 213213 dsdadasd~...." b.title = _value assert b.title == _value b._setupUI() assert b.title == _value assert b._root.title() == _value b.on_timer = lambda: b.close() b.start_timer(TIME_TO_CLOSE) b.show() assert b.title == _value assert b._root.title() == _value
def test_title(self): b = Board(2, 2) _value = "qwertyu 213213 dsdadasd~...." b.title = _value self.assertEqual(b.title, _value) b._setupUI() self.assertEqual(b.title, _value) self.assertEqual(b._root.title(), _value) b.on_timer = lambda: b.close() b.start_timer(TIME_TO_CLOSE) b.show() self.assertEqual(b.title, _value) self.assertEqual(b._root.title(), _value)