'Test with a fake macOS.
Args:
mac_ver: The tuple to set platform.mac_ver() to.
mac_ver_str: The expected Mac version string in version._os_info().'

@pytest.mark.parametrize('mac_ver,    mac_ver_str', [(('x', ('', '', ''), 'y'), 'x,    y'), (('', ('', '', ''), ''), ''), (('x', ('1', '2', '3'), 'y'), 'x,    1.2.3,    y')])
def test_mac_fake(self, monkeypatch, mac_ver, mac_ver_str):

    monkeypatch.setattr(version.sys, 'platform', 'darwin')
    monkeypatch.setattr(version.platform, 'mac_ver', (lambda : mac_ver))
    ret = version._os_info()
    expected = ['OS    Version:    {}'.format(mac_ver_str)]
    assert (ret == expected)
