def test_cleanup(self):
        """Test queue dir is removed if queue is empty"""
        q = self.queue()
        values = [b'0', b'1', b'2', b'3', b'4']
        assert os.path.exists(self.qpath)
        for x in values:
            q.push(x)

        for x in values:
            q.pop()
        q.close()
        assert not os.path.exists(self.qpath)
Test queue dir is removed if queue is empty
stackoverflow/venv/lib/python3.6/site-packages/queuelib/tests/test_queue.py