<s> import os <EOL> import sys <EOL> import shutil <EOL> from supybot . test import * <EOL> import supybot . utils . minisix as minisix <EOL> pluginsPath = '<STR_LIT>' % os . getcwd ( ) <EOL> class PluginDownloaderTestCase ( PluginTestCase ) : <EOL> plugins = ( '<STR_LIT>' , ) <EOL> config = { '<STR_LIT>' : [ pluginsPath ] } <EOL> def setUp ( self ) : <EOL> PluginTestCase . setUp ( self ) <EOL> try : <EOL> shutil . rmtree ( pluginsPath ) <EOL> except : <EOL> pass <EOL> os . mkdir ( pluginsPath ) <EOL> def tearDown ( self ) : <EOL> try : <EOL> shutil . rmtree ( pluginsPath ) <EOL> finally : <EOL> PluginTestCase . tearDown ( self ) <EOL> def _testPluginInstalled ( self , name ) : <EOL> assert os . path . isdir ( pluginsPath + '<STR_LIT>' % name ) <EOL> assert os . path . isfile ( pluginsPath + '<STR_LIT>' % name ) <EOL> assert os . path . isfile ( pluginsPath + '<STR_LIT>' % name ) <EOL> def testRepolist ( self ) : <EOL> self . assertRegexp ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . assertRegexp ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . assertRegexp ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> def testInstallProgVal ( self ) : <EOL> self . assertError ( '<STR_LIT>' ) <EOL> self . assertNotError ( '<STR_LIT>' ) <EOL> self . assertError ( '<STR_LIT>' ) <EOL> self . _testPluginInstalled ( '<STR_LIT>' ) <EOL> def testInstallQuantumlemur ( self ) : <EOL> self . assertError ( '<STR_LIT>' ) <EOL> self . assertNotError ( '<STR_LIT>' ) <EOL> self . assertError ( '<STR_LIT>' ) <EOL> self . _testPluginInstalled ( '<STR_LIT>' ) <EOL> def testInstallStepnem ( self ) : <EOL> self . assertNotError ( '<STR_LIT>' ) <EOL> self . _testPluginInstalled ( '<STR_LIT>' ) <EOL> def testInstallNanotubeBitcoin ( self ) : <EOL> self . assertNotError ( '<STR_LIT>' ) <EOL> self . _testPluginInstalled ( '<STR_LIT>' ) <EOL> def testInstallMtughanWeather ( self ) : <EOL> self . assertNotError ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> self . _testPluginInstalled ( '<STR_LIT>' ) <EOL> def testInstallSpiderDave ( self ) : <EOL> self . assertNotError ( '<STR_LIT>' ) <EOL> self . _testPluginInstalled ( '<STR_LIT>' ) <EOL> def testInfo ( self ) : <EOL> self . assertResponse ( '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> if minisix . PY3 : <EOL> def test_2to3 ( self ) : <EOL> self . assertRegexp ( '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> self . assertNotError ( '<STR_LIT>' ) <EOL> if not network : <EOL> class PluginDownloaderTestCase ( PluginTestCase ) : <EOL> pass </s>
