2
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
3
# See LICENSE for details.
6
from twisted.trial import unittest
7
from twisted.python.runtime import platformType
9
class AtLeastImportTestCase(unittest.TestCase):
11
"""I test that there are no syntax errors which will not allow importing.
14
failureException = ImportError
17
"""Test importing other misc. modules
19
from twisted import copyright
21
def test_persisted(self):
22
"""Test importing persisted
24
from twisted.persisted import dirdbm
25
from twisted.persisted import styles
27
def test_internet(self):
28
"""Test importing internet
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
39
"""internet modules for unix."""
40
from twisted.internet import stdio
41
from twisted.internet import process
42
from twisted.internet import unix
44
if platformType != "posix":
45
test_unix.skip = "UNIX-only modules"
47
def test_spread(self):
48
"""Test importing spreadables
50
from twisted.spread import pb
51
from twisted.spread import jelly
52
from twisted.spread import banana
53
from twisted.spread import flavors
55
def test_twistedPython(self):
56
"""Test importing twisted.python
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
66
def test_protocols(self):
67
"""Test importing protocols
69
from twisted.protocols import basic
70
from twisted.protocols import ftp
71
from twisted.protocols import telnet
72
from twisted.protocols import policies
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