def test_chunks(self):
        """Test chunks are created and removed"""
        values = [b'0', b'1', b'2', b'3', b'4']
        q = self.queue()
        for x in values:
            q.push(x)

        chunks = glob.glob(os.path.join(self.qpath, 'q*'))
        self.assertEqual(len(chunks), 5 // self.chunksize + 1)
        for x in values:
            q.pop()

        chunks = glob.glob(os.path.join(self.qpath, 'q*'))
        self.assertEqual(len(chunks), 1)
Test chunks are created and removed
stackoverflow/venv/lib/python3.6/site-packages/queuelib/tests/test_queue.py