Source

pyfiboheap / tests / test_copy.py

Full commit
import fiboheaps
import unittest

class TestCopy(unittest.TestCase):
    def setUp(self):
        self.heap = fiboheaps.FibonacciHeap()
        self.heap.extend(range(100))

    def testCopy(self):
        copy = self.heap.copy()
        self.assertSetEqual(
            set(self.heap),
            set(copy))