-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestFile.py
More file actions
36 lines (32 loc) · 915 Bytes
/
testFile.py
File metadata and controls
36 lines (32 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from lab04 import solveMaze
def test_solveMaze():
maze = [
['+','+','+','+','+','+'],
['+',' ','+',' ',' ','+'],
['+',' ',' ',' ','G','+'],
['+',' ','+','+','+','+'],
['+',' ',' ',' ',' ','+'],
['+','+','+','+','+','+']]
maze1 = [
['+','+','+','+','+','+'],
['+',' ','+',' ','+','G'],
['+',' ',' ',' ','+','+'],
['+',' ','+','+',' ','+'],
['+',' ',' ',' ',' ','+'],
['+','+','+','+','+','+']]
assert solveMaze(maze,4,4) == True
assert maze == [
['+','+','+','+','+','+'],
['+',7,'+',10,11,'+'],
['+',6,8,9,'G','+'],
['+',5,'+','+','+','+'],
['+',4,3,2,1,'+'],
['+','+','+','+','+','+']]
assert solveMaze(maze1,4,4) == False
assert maze1 == [
['+','+','+','+','+','+'],
['+',8,'+',11,'+','G'],
['+',7,9,10,'+','+'],
['+',6,'+','+',2,'+'],
['+',5,4,3,1,'+'],
['+','+','+','+','+','+']]