~ntt-pf-lab/nova/monkey_patch_notification

« back to all changes in this revision

Viewing changes to vendor/Twisted-10.0.0/twisted/test/test_import.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
 
 
2
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
 
3
# See LICENSE for details.
 
4
 
 
5
 
 
6
from twisted.trial import unittest
 
7
from twisted.python.runtime import platformType
 
8
 
 
9
class AtLeastImportTestCase(unittest.TestCase):
 
10
 
 
11
    """I test that there are no syntax errors which will not allow importing.
 
12
    """
 
13
 
 
14
    failureException = ImportError
 
15
 
 
16
    def test_misc(self):
 
17
        """Test importing other misc. modules
 
18
        """
 
19
        from twisted import copyright
 
20
 
 
21
    def test_persisted(self):
 
22
        """Test importing persisted
 
23
        """
 
24
        from twisted.persisted import dirdbm
 
25
        from twisted.persisted import styles
 
26
 
 
27
    def test_internet(self):
 
28
        """Test importing internet
 
29
        """
 
30
        from twisted.internet import tcp
 
31
        from twisted.internet import main
 
32
        # from twisted.internet import ssl    
 
33
        from twisted.internet import abstract
 
34
        from twisted.internet import udp
 
35
        from twisted.internet import protocol
 
36
        from twisted.internet import defer
 
37
 
 
38
    def test_unix(self):
 
39
        """internet modules for unix."""
 
40
        from twisted.internet import stdio
 
41
        from twisted.internet import process
 
42
        from twisted.internet import unix
 
43
    
 
44
    if platformType != "posix":
 
45
        test_unix.skip = "UNIX-only modules"
 
46
    
 
47
    def test_spread(self):
 
48
        """Test importing spreadables
 
49
        """
 
50
        from twisted.spread import pb
 
51
        from twisted.spread import jelly
 
52
        from twisted.spread import banana
 
53
        from twisted.spread import flavors
 
54
    
 
55
    def test_twistedPython(self):
 
56
        """Test importing twisted.python
 
57
        """
 
58
        from twisted.python import hook
 
59
        from twisted.python import log
 
60
        from twisted.python import reflect
 
61
        # from twisted.python import threadable
 
62
        # from twisted.python import threadpool
 
63
        from twisted.python import usage
 
64
        from twisted.python import otp
 
65
    
 
66
    def test_protocols(self):
 
67
        """Test importing protocols
 
68
        """
 
69
        from twisted.protocols import basic
 
70
        from twisted.protocols import ftp
 
71
        from twisted.protocols import telnet
 
72
        from twisted.protocols import policies
 
73
    
 
74
    def test_enterprise(self):
 
75
        from twisted.enterprise import adbapi
 
76
        from twisted.enterprise import reflector
 
77
        from twisted.enterprise import sqlreflector
 
78
        from twisted.enterprise import row