mirror of
https://github.com/maoakeEnterprise/amazing.git
synced 2026-11-01 15:42:03 +01:00
add Cell tester + FIX: west setter for Cell class
This commit is contained in:
1 parent
ac13df160f
commit
97b35fe3eb
6 files changed
+47
-31
No files matched your search
@@ -0,0 +1,31 @@
|
||||
import pytest
|
||||
from amaz_lib.Cell import Cell
|
||||
|
||||
|
||||
def test_cell_setter_getter() -> None:
|
||||
cell = Cell(value=0)
|
||||
|
||||
cell.set_north(True)
|
||||
assert cell.get_north() is True
|
||||
cell.set_north(False)
|
||||
assert cell.get_north() is False
|
||||
|
||||
cell.set_est(True)
|
||||
assert cell.get_est() is True
|
||||
cell.set_est(False)
|
||||
assert cell.get_est() is False
|
||||
|
||||
cell.set_south(True)
|
||||
assert cell.get_south() is True
|
||||
cell.set_south(False)
|
||||
assert cell.get_south() is False
|
||||
|
||||
cell.set_west(True)
|
||||
assert cell.get_west() is True
|
||||
cell.set_west(False)
|
||||
assert cell.get_west() is False
|
||||
|
||||
cell.set_value(8)
|
||||
assert cell.get_value() == 8
|
||||
cell.set_value(0)
|
||||
assert cell.get_value() == 0
|
||||
Reference in new issue
Block a user