1 | """Chess unit test module.""" |
||
2 | |||
3 | import unittest |
||
4 | from chess.chess import Chess |
||
5 | |||
6 | |||
7 | class TestChess(unittest.TestCase): |
||
8 | |||
9 | """Chess unit test class.""" |
||
10 | |||
11 | def setUp(self): |
||
12 | self.chess = Chess() |
||
13 | |||
14 | def test_init(self): |
||
0 ignored issues
–
show
|
|||
15 | assert isinstance(self.chess.board, dict) |
||
16 | |||
17 | def test_move_pawn_forward_once(self): |
||
0 ignored issues
–
show
This method should have a docstring.
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods: class SomeClass:
def some_method(self):
"""Do x and return foo."""
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions. ![]() |
|||
18 | pass |
||
19 | # start = (6, 4) |
||
20 | # end = (5, 4) |
||
21 | # assert self.chess.board[start] |
||
22 | # self.chess.move(start, end) |
||
23 | # assert self.chess.board[end] |
||
24 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.