summaryrefslogtreecommitdiffstats
path: root/aoc/tests/test_datastructures.py
blob: a7965f5c2466639f476a9d9b29070bc3d5fc9349 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# -*- coding: utf-8 -*-
from aoc.datastructures import Coordinate3


class TestCoordinate3:
    def test_neighbours_nodiagonal(self):
        coordinate = Coordinate3(0, 0, 0)

        assert set(coordinate.neighbours(True)) == {
            Coordinate3(-1, 0, 0),
            Coordinate3(1, 0, 0),
            Coordinate3(0, -1, 0),
            Coordinate3(0, 1, 0),
            Coordinate3(0, 0, -1),
            Coordinate3(0, 0, 1),
        }