tests package¶
Submodules¶
tests.test_RubiksCube module¶
- class tests.test_RubiksCube.TestRubiksCube(methodName='runTest')¶
Bases:
TestCaseUnit tests for the RubiksCube class.
- test_find_position()¶
Tests if the find_position() method works as expected.
- test_get_color()¶
Tests if the get_color() method works as expected.
- test_get_size()¶
Tests if the get_size() method returns the correct size.
- test_initial_scramble_solution_concatenation()¶
Tests if an initial scramble concatenated with its solution add up to a solved cube state in a new cube.
- test_invalid_moves()¶
Tests if some invalid moves raise ValueError exceptions.
- test_is_solvable()¶
Tests if the is_solvable() method works as expected.
- test_is_solved()¶
Tests if the is_solved() method works as expected.
- test_set_all_colors()¶
Tests if the set_all_colors() method works as expected.
- test_set_color()¶
Tests if the set_color() method works as expected.
- test_solve_change_state()¶
Tests if change_state argument from solve method works as expected.
- test_solve_random_scramble()¶
Tests if some random scrambles can be solved.
- test_solve_random_scramble_with_parameters()¶
Tests if some random scrambles (including special moves) can be solved.
- test_solve_returns_none()¶
Tests if unsolvable cubes and nonexistent methods make the solve() method return None.
- test_solve_solved_cube()¶
Tests if a solved cube can be solved, and returns an empty string.
- test_valid_moves()¶
Tests if some valid moves don’t raise exceptions.