def test_is_cygwin(self): """ Tests the method which let us know if the current platform is the CygWin one. """ with self.system_platform_mock as platform_patch: platform_patch.return_value = "Cygwin" expected = True actual = PlatformUtility.is_cygwin() self.assertEqual(expected, actual)
def test_is_cygwin_with_version(self): """ Tests the method which let us know if the current platform is the CygWin one for the case that it's given with a certain version. """ with self.system_platform_mock as platform_patch: platform_patch.return_value = "Cygwin-NT-50.0.1" expected = True actual = PlatformUtility.is_cygwin() self.assertEqual(expected, actual)
def test_is_not_cygwin(self): """ Tests the method which let us know if the current platform is the CygWin one for the case it's no cygwin version. """ with self.system_platform_mock as platform_patch: platform_patch.return_value = "Windows" expected = False actual = PlatformUtility.is_cygwin() self.assertEqual(expected, actual)