예제 #1
0
    def test_add_existing_neighbor(self):
        f = lambda x: x

        a = Cell(content='hello')
        a.new_neighbor(f)
        a.new_neighbor(f)
        self.assertEqual(len(a.neighbors), 1)
예제 #2
0
    def test_add_existing_neighbor(self):
        f = lambda x: x

        a = Cell(content='hello')
        a.new_neighbor(f)
        a.new_neighbor(f)
        self.assertEqual(len(a.neighbors), 1)
예제 #3
0
    def test_new_cell_with_neighbors(self):
        f = lambda x: x

        a = Cell(content='hello')
        a.new_neighbor(f)
        self.assertEqual(a.neighbors, [f])
예제 #4
0
    def test_new_cell_with_neighbors(self):
        f = lambda x: x

        a = Cell(content='hello')
        a.new_neighbor(f)
        self.assertEqual(a.neighbors, [f])