Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes | Static Public Attributes
test_pysupport.TestImportNonExisting Class Reference
Inheritance diagram for test_pysupport.TestImportNonExisting:
Inheritance graph
[legend]
Collaboration diagram for test_pysupport.TestImportNonExisting:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def testNonExisting
def setup_method
def checkPackage
def pluginExists
def pluginFilePath

Public Attributes

 pluginDirectory

Static Public Attributes

string plugin = 'NonExistingWikiPlugin'
string name = 'Parser'

Detailed Description

Definition at line 65 of file test_pysupport.py.


Member Function Documentation

def test_pysupport.TestImportNameFromPlugin.checkPackage (   self,
  path 
) [inherited]

Definition at line 52 of file test_pysupport.py.

00052 
00053     def checkPackage(self, path):
00054         for item in (path, os.path.join(path, '__init__.py')):
00055             if not os.path.exists(item):
00056                 py.test.skip("Missing or wrong permissions: %s" % item)

Definition at line 57 of file test_pysupport.py.

00057 
00058     def pluginExists(self):
00059         return (os.path.exists(self.pluginFilePath('.py')) or
00060                 os.path.exists(self.pluginFilePath('.pyc')))

Here is the call graph for this function:

Here is the caller graph for this function:

def test_pysupport.TestImportNameFromPlugin.pluginFilePath (   self,
  suffix 
) [inherited]

Definition at line 61 of file test_pysupport.py.

00061 
00062     def pluginFilePath(self, suffix):
00063         return os.path.join(self.pluginDirectory, self.plugin + suffix)
00064 

Here is the caller graph for this function:

def test_pysupport.TestImportNameFromPlugin.setup_method (   self,
  method 
) [inherited]
Check for valid plugin package 

Definition at line 47 of file test_pysupport.py.

00047 
00048     def setup_method(self, method):
00049         """ Check for valid plugin package """
00050         self.pluginDirectory = os.path.join(self.request.cfg.data_dir, 'plugin', 'parser')
00051         self.checkPackage(self.pluginDirectory)

pysupport: import nonexistent wiki plugin fail 

Definition at line 69 of file test_pysupport.py.

00069 
00070     def testNonExisting(self):
00071         """ pysupport: import nonexistent wiki plugin fail """
00072         if self.pluginExists():
00073             py.test.skip('plugin exists: %s' % self.plugin)
00074         py.test.raises(wikiutil.PluginMissingError,
00075                        wikiutil.importWikiPlugin,
00076                            self.request.cfg, 'parser',
00077                            self.plugin, 'Parser')
00078 

Here is the call graph for this function:


Member Data Documentation

string test_pysupport.TestImportNameFromPlugin.name = 'Parser' [static, inherited]

Definition at line 45 of file test_pysupport.py.

string test_pysupport.TestImportNonExisting.plugin = 'NonExistingWikiPlugin' [static]

Definition at line 67 of file test_pysupport.py.

Definition at line 49 of file test_pysupport.py.


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