add flake.nix && and basic quadtree from file import

This commit is contained in:
Awen lelu
2025-10-20 20:02:14 +02:00
parent e4c33dc6f4
commit a3ec861faa
8 changed files with 346 additions and 16 deletions

View File

@@ -1,15 +1,17 @@
import sys, os
sys.path.append(os.path.realpath(os.path.dirname(__file__)+"/.."))
sys.path.append(os.path.realpath(os.path.dirname(__file__) + "/.."))
from src import QuadTree, TkQuadTree
def test_sample():
filename = "files/quadtree.txt"
q = QuadTree.fromFile(filename)
assert q.depth == 4
def test_single():
filename = "files/quadtree_easy.txt"
q = QuadTree.fromFile(filename)
assert q.depth == 1
assert q.depth == 1