From 9abc51729e893375cecfe873c091dcaf31575c05 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Wed, 10 Dec 2008 19:19:21 +0000 Subject: [PATCH] Wrong place bzr-revno: 201 --- openlp/plugins/bibles/rt | 1 - openlp/plugins/bibles/test_bibleManager.py | 118 ------------------ openlp/plugins/bibles/test_bibleManagerAPI.py | 95 -------------- openlp/plugins/bibles/test_bibleManagerCSV.py | 61 --------- .../plugins/bibles/test_bibleManagerOSIS.py | 60 --------- 5 files changed, 335 deletions(-) delete mode 100755 openlp/plugins/bibles/rt delete mode 100644 openlp/plugins/bibles/test_bibleManager.py delete mode 100644 openlp/plugins/bibles/test_bibleManagerAPI.py delete mode 100644 openlp/plugins/bibles/test_bibleManagerCSV.py delete mode 100644 openlp/plugins/bibles/test_bibleManagerOSIS.py diff --git a/openlp/plugins/bibles/rt b/openlp/plugins/bibles/rt deleted file mode 100755 index 84998ec9b..000000000 --- a/openlp/plugins/bibles/rt +++ /dev/null @@ -1 +0,0 @@ -py.test --nocapture test_bibleManager.py diff --git a/openlp/plugins/bibles/test_bibleManager.py b/openlp/plugins/bibles/test_bibleManager.py deleted file mode 100644 index e530d8cac..000000000 --- a/openlp/plugins/bibles/test_bibleManager.py +++ /dev/null @@ -1,118 +0,0 @@ -""" -OpenLP - Open Source Lyrics Projection -Copyright (c) 2008 Raoul Snyman -Portions copyright (c) 2008 Martin Thompson, Tim Bentley - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA -""" - -import random -import unittest - -import os, os.path -import sys -mypath=os.path.split(os.path.abspath(__file__))[0] -sys.path.insert(0,(os.path.join(mypath, '..', '..','..','..'))) - -from openlp.plugins.bibles.lib.biblemanager import BibleManager -from openlp.utils import ConfigHelper - -import logging -logging.basicConfig(level=logging.DEBUG, - format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', - datefmt='%m-%d %H:%M', - filename='plugins.log', - filemode='w') - -console=logging.StreamHandler() -# set a format which is simpler for console use -formatter = logging.Formatter('%(name)-12s: %(levelname)-8s %(message)s') -# tell the handler to use this format -console.setFormatter(formatter) -logging.getLogger('').addHandler(console) -log=logging.getLogger('') - -logging.info("\nLogging started") - -class TestBibleManager: - log=logging.getLogger("testBibleMgr") - def setup_class(self): - log.debug("\n.......Register BM") - self.bm = BibleManager() - - def testRegisterCSVBibleFiles(self): - # Register a bible from files - log.debug("\n.......testRegisterBibleFiles") - self.bm.registerFileBible("TheMessage",'biblebooks_msg_short.csv','bibleverses_msg_short.csv') - self.bm.registerFileBible("NIV",'biblebooks_niv_short.csv','bibleverses_niv_short.csv') - b = self.bm.getBibles() - for b1 in b: - log.debug( b1) - assert(b1 in b) - - def testRegisterHTTPBible(self): - # Register a bible from files - log.debug( "\n.......testRegisterBibleHTTP") - self.bm.registerHTTPBible("asv","Crosswalk", "", "", "") - self.bm.registerHTTPBible("nasb","Biblegateway", "", "", "") - self.bm.registerHTTPBible("nkj","Biblegateway", "http://tigger2:3128/", "", "") - b = self.bm.getBibles() - for b1 in b: - log.debug( b1) - assert(b1 in b) - - - def testGetBibles(self): - log.debug( "\n.......testGetBibles") - # make sure the shuffled sequence does not lose any elements - b = self.bm.getBibles() - for b1 in b: - log.debug( b1) - assert(b1 in b) - - def testGetBibleBooks(self): - log.debug( "\n.......testGetBibleBooks") - c = self.bm.getBibleBooks("NIV") - for c1 in c: - log.debug( c1) - assert(c1 in c) - - def testGetBookChapterCount(self): - log.debug( "\n.......testGetBookChapterCount") - assert(self.bm.getBookChapterCount("Matthew") == '28') - - def testGetBookVerseCount(self): - log.debug( "\n.......testGetBookVerseCount") - assert(self.bm.getBookVerseCount("Genesis", 1) == '31') - assert(self.bm.getBookVerseCount("Genesis", 2) == '25') - assert(self.bm.getBookVerseCount("Matthew", 1) == '25') - assert(self.bm.getBookVerseCount("Revelation", 1) == '20') - - def testGetVerseText(self): - log.debug( "\n.......testGetVerseText") - #c = self.bm.getVerseText("TheMessage",'Genesis',1,2,1) - #log.debug( c ) - #c = self.bm.getVerseText('NIV','Genesis',1,1,2) - #log.debug( c ) - c = self.bm.getVerseText('asv','Genesis',10,1,20) - log.debug( c ) - c = self.bm.getVerseText('nasb','Genesis',10,1,20) - log.debug( c ) - c = self.bm.getVerseText('nkj','Revelation',10,1,20) - log.debug( c ) - - def testLoadBible(self): - log.debug( "\n.......testLoadBible") - #self.bm.loadBible('asv') - #self.bm.loadBible('nasb') - #self.bm.loadBible('nkj') diff --git a/openlp/plugins/bibles/test_bibleManagerAPI.py b/openlp/plugins/bibles/test_bibleManagerAPI.py deleted file mode 100644 index ccde98a1e..000000000 --- a/openlp/plugins/bibles/test_bibleManagerAPI.py +++ /dev/null @@ -1,95 +0,0 @@ -""" -OpenLP - Open Source Lyrics Projection -Copyright (c) 2008 Raoul Snyman -Portions copyright (c) 2008 Martin Thompson, Tim Bentley - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA -""" - -import random -import unittest - -import os, os.path -import sys -mypath=os.path.split(os.path.abspath(__file__))[0] -sys.path.insert(0,(os.path.join(mypath, '..', '..','..','..'))) - -from openlp.plugins.biblemanager.bibleManager import BibleManager -from openlp.core.utils import ConfigHelper - -import logging -logging.basicConfig(level=logging.DEBUG, - format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', - datefmt='%m-%d %H:%M', - filename='plugins.log', - filemode='w') - -console=logging.StreamHandler() -# set a format which is simpler for console use -formatter = logging.Formatter('%(name)-12s: %(levelname)-8s %(message)s') -# tell the handler to use this format -console.setFormatter(formatter) -logging.getLogger('').addHandler(console) -log=logging.getLogger('') - -logging.info("\nLogging started") - -class TestBibleManager: - log=logging.getLogger("testBibleMgr") - def setup_class(self): - log.debug("\n.......Register BM") - self.bm = BibleManager() - - def testGetBibles(self): - log.debug( "\n.......testGetBibles") - # make sure the shuffled sequence does not lose any elements - b = self.bm.getBibles() - for b1 in b: - log.debug( b1) - assert(b1 in b) - - def testGetBibleBooks(self): - log.debug( "\n.......testGetBibleBooks") - c = self.bm.getBibleBooks("asv") - for c1 in c: - log.debug( c1) - assert(c1 in c) - - def testGetBookChapterCount(self): - log.debug( "\n.......testGetBookChapterCount") - assert(self.bm.getBookChapterCount("asv","Matthew")[0] == 28) - - def testGetBookVerseCount(self): - log.debug( "\n.......testGetBookVerseCount") - assert(self.bm.getBookVerseCount("asv","Genesis", 1)[0] == 31) - assert(self.bm.getBookVerseCount("TheMessage","Genesis", 2)[0] == 25) - assert(self.bm.getBookVerseCount("asv","Matthew", 1)[0] == 25) - assert(self.bm.getBookVerseCount("TheMessage","Revelation", 1)[0] == 20) - - def testGetVerseText(self): - log.debug( "\n.......testGetVerseText") - #c = self.bm.getVerseText("TheMessage",'Genesis',1,2,1) - #log.debug( c ) - #c = self.bm.getVerseText('NIV','Genesis',1,1,2) - #log.debug( c ) - c = self.bm.getVerseText('asv','Genesis',10,1,20) - log.debug( c ) - c = self.bm.getVerseText('TheMessage','Genesis',10,1,20) - log.debug( c ) - c = self.bm.getVerseText('asv','Revelation',10,1,20) - log.debug( c ) - c = self.bm.getVersesFromText("asv", "Jesus wept") - log.debug( c ) - c = self.bm.getVersesFromText("TheMessage", "Jesus wept") - log.debug( c ) - diff --git a/openlp/plugins/bibles/test_bibleManagerCSV.py b/openlp/plugins/bibles/test_bibleManagerCSV.py deleted file mode 100644 index 03d8ea7b7..000000000 --- a/openlp/plugins/bibles/test_bibleManagerCSV.py +++ /dev/null @@ -1,61 +0,0 @@ -""" -OpenLP - Open Source Lyrics Projection -Copyright (c) 2008 Raoul Snyman -Portions copyright (c) 2008 Martin Thompson, Tim Bentley - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA -""" - -import random -import unittest - -import os, os.path -import sys -mypath=os.path.split(os.path.abspath(__file__))[0] -sys.path.insert(0,(os.path.join(mypath, '..', '..','..','..'))) - -from openlp.plugins.bibles.lib.biblemanager import BibleManager -from openlp.utils import ConfigHelper - -import logging -logging.basicConfig(level=logging.DEBUG, - format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', - datefmt='%m-%d %H:%M', - filename='plugins.log', - filemode='w') - -console=logging.StreamHandler() -# set a format which is simpler for console use -formatter = logging.Formatter('%(name)-12s: %(levelname)-8s %(message)s') -# tell the handler to use this format -console.setFormatter(formatter) -logging.getLogger('').addHandler(console) -log=logging.getLogger('') - -logging.info("\nLogging started") - -class TestBibleManager: - log=logging.getLogger("testBibleMgr") - def setup_class(self): - log.debug("\n.......Register BM") - self.bm = BibleManager() - - def testRegisterCSVBibleFiles(self): - # Register a bible from files - log.debug("\n.......testRegisterBibleFiles") - self.bm.registerCSVFileBible("TheMessage",'biblebooks_msg_short.csv','bibleverses_msg_short.csv') - self.bm.registerCSVFileBible("NIV",'biblebooks_niv_short.csv','bibleverses_niv_short.csv') - b = self.bm.getBibles() - for b1 in b: - log.debug( b1) - assert(b1 in b) diff --git a/openlp/plugins/bibles/test_bibleManagerOSIS.py b/openlp/plugins/bibles/test_bibleManagerOSIS.py deleted file mode 100644 index 8689f9a76..000000000 --- a/openlp/plugins/bibles/test_bibleManagerOSIS.py +++ /dev/null @@ -1,60 +0,0 @@ -""" -OpenLP - Open Source Lyrics Projection -Copyright (c) 2008 Raoul Snyman -Portions copyright (c) 2008 Martin Thompson, Tim Bentley - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA -""" - -import random -import unittest - -import os, os.path -import sys -mypath=os.path.split(os.path.abspath(__file__))[0] -sys.path.insert(0,(os.path.join(mypath, '..', '..','..','..'))) - -from openlp.plugins.bibles.lib.biblemanager import BibleManager -from openlp.utils import ConfigHelper - -import logging -logging.basicConfig(level=logging.DEBUG, - format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', - datefmt='%m-%d %H:%M', - filename='plugins.log', - filemode='w') - -console=logging.StreamHandler() -# set a format which is simpler for console use -formatter = logging.Formatter('%(name)-12s: %(levelname)-8s %(message)s') -# tell the handler to use this format -console.setFormatter(formatter) -logging.getLogger('').addHandler(console) -log=logging.getLogger('') - -logging.info("\nLogging started") - -class TestBibleManager: - log=logging.getLogger("testBibleMgr") - def setup_class(self): - log.debug("\n.......Register BM") - self.bm = BibleManager() - - def testRegisterOSISBibleFiles(self): - # Register a bible from files - log.debug("\n.......testRegisterOSISBibleFiles") - self.bm.registerOSISFileBible("asv",'asv.osis') - b = self.bm.getBibles() - for b1 in b: - log.debug( b1) - assert(b1 in b)