summaryrefslogtreecommitdiffstats
path: root/aoc/tests
diff options
context:
space:
mode:
authorGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2022-12-19 09:30:43 +0100
committerGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2022-12-19 09:30:43 +0100
commitf3d0899dbfd0aa3e6aebf5d19ec89d58ead418b2 (patch)
tree535a7048c7547e1eaef6f97dcfd8b2cad598ca50 /aoc/tests
parent06cb539f69f0b501afaa9ef5b6d89863e1c9d111 (diff)
download2022-f3d0899dbfd0aa3e6aebf5d19ec89d58ead418b2.tar.gz
2022-f3d0899dbfd0aa3e6aebf5d19ec89d58ead418b2.tar.bz2
2022-f3d0899dbfd0aa3e6aebf5d19ec89d58ead418b2.zip
Day 18
Diffstat (limited to 'aoc/tests')
-rw-r--r--aoc/tests/__init__.py0
-rw-r--r--aoc/tests/test_datastructures.py16
2 files changed, 16 insertions, 0 deletions
diff --git a/aoc/tests/__init__.py b/aoc/tests/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/aoc/tests/__init__.py
diff --git a/aoc/tests/test_datastructures.py b/aoc/tests/test_datastructures.py
new file mode 100644
index 0000000..a7965f5
--- /dev/null
+++ b/aoc/tests/test_datastructures.py
@@ -0,0 +1,16 @@
1# -*- coding: utf-8 -*-
2from aoc.datastructures import Coordinate3
3
4
5class TestCoordinate3:
6 def test_neighbours_nodiagonal(self):
7 coordinate = Coordinate3(0, 0, 0)
8
9 assert set(coordinate.neighbours(True)) == {
10 Coordinate3(-1, 0, 0),
11 Coordinate3(1, 0, 0),
12 Coordinate3(0, -1, 0),
13 Coordinate3(0, 1, 0),
14 Coordinate3(0, 0, -1),
15 Coordinate3(0, 0, 1),
16 }