Beispiel #1
0
def artefact_os_name():
    if host.is_macos():
        return 'Mac_OS_X'
    elif host.is_linux():
        return 'Linux'
    else:
        raise SandboxUnsupportedOsError()
Beispiel #2
0
 def add_oci_in_docker(features):
     if OciInDockerFeature.name not in names and not host.is_linux():
         features.insert(
             0,
             feature_lookup[OciInDockerFeature.name]([], image_version,
                                                     offline_mode))
Beispiel #3
0
 def test_macos(self):
     mock_system = MagicMock(return_value='Darwin')
     with patch('platform.system', mock_system):
         self.assertFalse(host.is_linux())
         self.assertTrue(host.is_macos())