def test_get_connections_disjoint(self): coords2 = numpy.array(COORDS) + 1 res = get_connections(ELEMENTS, COORDS, ELEMENTS, coords2) expected = { 0: {4: '1'}, 1: {0: '1', 4: '1'}, 2: {4: '1'}, 3: {}, 4: {} } self.assertEqual(res, expected)
def test_get_connections(self): res = get_connections(ELEMENTS, COORDS) self.assertEqual(res, CONNECTIONS)