def test_read_zero_size_data(self):
        CHUNKSIZE = 100
        checksum = hashlib.md5()
        data_file = tempfile.NamedTemporaryFile()
        infile = open(data_file.name, 'rb')
        bytes_read = 0
        while True:
            cr = swift.ChunkReader(infile, checksum, CHUNKSIZE)
            chunk = cr.read(CHUNKSIZE)
            if len(chunk) == 0:
                break
            bytes_read += len(chunk)
        self.assertEqual(True, cr.is_zero_size)
        self.assertEqual(0, bytes_read)
        self.assertEqual('d41d8cd98f00b204e9800998ecf8427e',
                         cr.checksum.hexdigest())
        data_file.close()
        infile.close()
Explained variance regression score function
dataset/ETHPy150Open openstack/glance_store/glance_store/tests/unit/test_swift_store.py/TestChunkReader.test_read_zero_size_data--crossover with--dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/metrics/regression.py/explained_variance_score