~cbehrens/nova/lp844160-build-works-with-zones

« back to all changes in this revision

Viewing changes to vendor/Twisted-10.0.0/twisted/python/test/test_runtime.py

  • Committer: Jesse Andrews
  • Date: 2010-05-28 06:05:26 UTC
  • Revision ID: git-v1:bf6e6e718cdc7488e2da87b21e258ccc065fe499
initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (c) 2008 Twisted Matrix Laboratories.
 
2
# See LICENSE for details.
 
3
 
 
4
"""
 
5
Tests for runtime checks.
 
6
"""
 
7
 
 
8
 
 
9
 
 
10
from twisted.python.runtime import Platform
 
11
from twisted.trial.unittest import TestCase
 
12
 
 
13
 
 
14
 
 
15
class PlatformTests(TestCase):
 
16
    """
 
17
    Tests for L{Platform}.
 
18
    """
 
19
 
 
20
    def test_isVistaConsistency(self):
 
21
        """
 
22
        Verify consistency of L{Platform.isVista}: it can only be C{True} if
 
23
        L{Platform.isWinNT} and L{Platform.isWindows} are C{True}.
 
24
        """
 
25
        platform = Platform()
 
26
        if platform.isVista():
 
27
            self.assertTrue(platform.isWinNT())
 
28
            self.assertTrue(platform.isWindows())
 
29
            self.assertFalse(platform.isMacOSX())