def setUpModule(): if not hasattr(Shared,"settings") or not hasattr(Shared,"debug"): #not moduleSetUp: # 026 The condition doesn't work in pyDev coz global vars aren't loaded. print "Setting up the module." settings=Settings() settings.pathStorage=UnixPathStorageMock() # settings.mainINIFilePath="/media/KINGSTON/Sumid/src/testing.ini" # 026 For future - testing could have other settings. # settings.loadAdaptive("all") # 026 Conflicts with args loaded by unittest. settings.loadAdaptive("INI","sumid") settings.workDir="/home/sumid.results/unittests/" settings.logDir="/home/sumid.results/unittests/" Shared.settings=settings debug=Debug(settings) Shared.debug=debug
_nonMatchRegexp = None _matchRegexp = None # body begin if __name__ == "__main__": settings = Settings() Shared.settings = settings settings.mainINIFilePath = mainINIFilePath settings.loadAdaptive("all") settings.loadFromINI(mainINIFilePath) debug = Debug(settings) Shared.debug = debug factory = FactoryMethod() settings.pathStorage = factory.create(eval(settings.platform + "PathStorage")) factory.sharedRef.pathStorage = settings.pathStorage files = FilesAdaptorComplex() settings.connectFilesAdaptor(files) linklistAdaptor = LinklistAdaptor() linklistAdaptor.connectLinklistFile(files.linklist) textLinklistParser = TextLinklistParser() textLinklistParser.connectLinklistAdaptor(linklistAdaptor) debug.ThreadAwareLogger.info("Basic initialization complete.") counters = CounterManager() files.connectDB()