Back to index

moin  1.9.0~rc2
Public Member Functions
test_pysupport.TestImportNameFromMoin Class Reference

List of all members.

Public Member Functions

def testNonExistingModule
def testNonExistingAttribute
def testExisting

Detailed Description

Test importName of MoinMoin modules

We don't make any testing for files, assuming that moin package is
not broken.

Definition at line 18 of file test_pysupport.py.


Member Function Documentation

pysupport: import name from existing module 

Definition at line 35 of file test_pysupport.py.

00035 
00036     def testExisting(self):
00037         """ pysupport: import name from existing module """
00038         from MoinMoin.parser import text_moin_wiki
00039         Parser = pysupport.importName('MoinMoin.parser.text_moin_wiki', 'Parser')
00040         assert Parser is text_moin_wiki.Parser
00041 

pysupport: import nonexistent attritbue raises AttributeError 

Definition at line 30 of file test_pysupport.py.

00030 
00031     def testNonExistingAttribute(self):
00032         """ pysupport: import nonexistent attritbue raises AttributeError """
00033         py.test.raises(AttributeError, pysupport.importName,
00034                        'MoinMoin.parser.text_moin_wiki', 'NoSuchParser')

pysupport: import nonexistent module raises ImportError 

Definition at line 25 of file test_pysupport.py.

00025 
00026     def testNonExistingModule(self):
00027         """ pysupport: import nonexistent module raises ImportError """
00028         py.test.raises(ImportError, pysupport.importName,
00029                        'MoinMoin.parser.abcdefghijkl', 'Parser')


The documentation for this class was generated from the following file: