def test_isMacOSXConsistency(self): """ L{Platform.isMacOSX} can only return C{True} if L{Platform.getType} returns C{'posix'}. """ platform = Platform() if platform.isMacOSX(): self.assertEqual(platform.getType(), 'posix')
def test_isWinNT(self): """ L{Platform.isWinNT} can return only C{False} or C{True} and can not return C{True} if L{Platform.getType} is not C{"win32"}. """ platform = Platform() isWinNT = platform.isWinNT() self.assertIn(isWinNT, (False, True)) if platform.getType() != "win32": self.assertEqual(isWinNT, False)
def test_isWinNT(self): """ L{Platform.isWinNT} can return only C{0} or C{1} and can not return C{1} if L{Platform.getType} is not C{"win32"}. """ platform = Platform() isWinNT = platform.isWinNT() self.assertTrue(isWinNT in (0, 1)) if platform.getType() != "win32": self.assertEqual(isWinNT, 0)