'Two identical rings should produce identical .gz files on disk.'

def test_deterministic_serialization(self):

    os.mkdir(os.path.join(self.testdir, '1'))
    os.mkdir(os.path.join(self.testdir, '2'))
    ring_fname1 = os.path.join(self.testdir, '1', 'the.ring.gz')
    ring_fname2 = os.path.join(self.testdir, '2', 'the.ring.gz')
    rd = ring.RingData([array.array('H', [0, 1, 0, 1]), array.array('H', [0, 1, 0, 1])], [{'id': 0, 'zone': 0}, {'id': 1, 'zone': 1}], 30)
    rd.save(ring_fname1)
    rd.save(ring_fname2)
    with open(ring_fname1) as ring1:
        with open(ring_fname2) as ring2:
            self.assertEqual(ring1.read(), ring2.read())
