new tests

This commit is contained in:
Mona Benkert 2025-11-04 17:14:36 +01:00
parent 848326ab4d
commit f5afa78ff9
2 changed files with 16 additions and 1 deletions

View File

@ -1,4 +1,11 @@
from matrixmania import rot_2D
import math
def test_rot_1():
angle =
angle = 0
assert rot_2D(angle) == [[1.0, -0.0],
[0.0, 1.0]]
def test_rot_2():
angle = math.pi
assert rot_2D(angle) == [[-1.0, -1.2246467991473532e-16], [1.2246467991473532e-16, -1.0]]

8
test/test_transpose.py Normal file
View File

@ -0,0 +1,8 @@
from matrixmania import transpose
def test_transpose_1():
a = [[1, 2, 3],
[4, 5, 6]]
assert transpose(a) == [[1, 4],
[2, 5],
[3, 6]]