def test_clone(self): n1 = Node(10, 11, "a") n1.currentPos = 20 n1.layerIndex = 3 n2 = n1.clone() self.assertEqual(n2.idealPos, 10) self.assertEqual(n2.width, 11) self.assertEqual(n2.data, "a") self.assertEqual(n2.currentPos, 20) self.assertEqual(n2.layerIndex, 3)
def test_clone(self): n1 = Node(10, 11, 'a') n1.currentPos = 20 n1.layerIndex = 3 n2 = n1.clone() self.assertEqual(n2.idealPos, 10) self.assertEqual(n2.width, 11) self.assertEqual(n2.data, 'a') self.assertEqual(n2.currentPos, 20) self.assertEqual(n2.layerIndex, 3)
def test_getLayerIndex(self): n1 = Node(10, 10) self.assertEqual(n1.getLayerIndex(), 0) n1.layerIndex = 10 self.assertEqual(n1.getLayerIndex(), 10)
def test_getLayerIndex(self): n1 = Node(10, 10) self.assertEqual(n1.getLayerIndex(), 0) n1.layerIndex = 10 self.assertEqual(n1.getLayerIndex(), 10)