mirror of
https://github.com/maoakeEnterprise/amazing.git
synced 2026-11-01 15:42:03 +01:00
finish the generator DFS
This commit is contained in:
1 parent
8b4ef7afce
commit
4d151664ab
5 files changed
+44
-46
No files matched your search
@@ -1,18 +1,19 @@
|
||||
import numpy
|
||||
from amaz_lib.MazeGenerator import DepthFirstSearch
|
||||
from amaz_lib.MazeGenerator import Kruskal
|
||||
|
||||
|
||||
class TestMazeGenerator:
|
||||
|
||||
# def test_kruskal_output_shape() -> None:
|
||||
# generator = Kruskal()
|
||||
# maze = numpy.array([])
|
||||
# for output in generator.generator(10, 10):
|
||||
# maze = output
|
||||
def test_kruskal_output_shape() -> None:
|
||||
generator = Kruskal().generator(10, 10)
|
||||
maze = numpy.array([])
|
||||
for output in generator:
|
||||
maze = output
|
||||
|
||||
# assert maze.shape == (10, 10)
|
||||
assert maze.shape == (10, 10)
|
||||
|
||||
def test_generator(self):
|
||||
def test_generator(self) -> None:
|
||||
maze = numpy.array([])
|
||||
maze = DepthFirstSearch.generator(10, 10)
|
||||
assert maze.shape == (10, 10)
|
||||
Reference in new issue
Block a user