Re: Put memorydb in roundup path?
Ralf Schlatterbeck <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.devel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Mar 30, 2021 at 12:13:04PM -0400, John P. Rouillard wrote: > Hi Ralf: > > In message <[email protected]>, > Ralf Schlatterbeck writes: > >I've pushed my changes. Note that the test/test_config.py seems to have > >been broken before my changes. > > Hmm, the only breakage I know of caused by a debugging print statement > that was accidently left in. But it broke tests of the admin interfce > not config. > > What failure were you seeing in test_config? > > I just did a bunch of updates to test_config due to changes in > configuration.py. Everything is passing in CI for me at the > moment. Are you still seeing breakage? Yes I'm seeing three failing tests in test/test_config.py with both, python2 and python3. Am I missing something here? Should I create an issue for it? Maybe the tests have to be made conditional on installed xapian? ============================== test session starts =============================== platform linux -- Python 3.7.3, pytest-3.10.1, py-1.7.0, pluggy-0.8.0 rootdir: /home/ralf/checkout/sourceforge/roundup.hg.tip, inifile: collected 22 items test/test_config.py ..............F.FF.... [100%] ==================================== FAILURES ==================================== ________________ TrackerConfig.testInvalidIndexerLanguage_w_empty ________________ self = <test.test_config.TrackerConfig testMethod=testInvalidIndexerLanguage_w_empty> def testInvalidIndexerLanguage_w_empty(self): """ make sure we have a reasonable error message if invalid indexer language is specified. This uses default search path for indexers. """ # SETUP: set indexer_language value to an invalid value. self.munge_configini(mods=[ ("indexer = ", ""), ("indexer_language = ", "NO_LANG") ]) config = configuration.CoreConfig() with self.assertRaises(configuration.OptionValueError) as cm: > config.load(self.dirname) E AssertionError: OptionValueError not raised test/test_config.py:388: AssertionError _______________ TrackerConfig.testInvalidIndexerLanguage_w_xapian ________________ self = <test.test_config.TrackerConfig testMethod=testInvalidIndexerLanguage_w_xapian> def testInvalidIndexerLanguage_w_xapian(self): """ Use explicit xapian indexer. Verify exception is generated. """ print("Testing explicit xapian") self.munge_configini(mods=[ ("indexer = ", "xapian"), ("indexer_language = ", "NO_LANG") ]) with self.assertRaises(configuration.OptionValueError) as cm: > config.load(self.dirname) E AssertionError: OptionValueError not raised test/test_config.py:452: AssertionError ------------------------------ Captured stdout call ------------------------------ Testing explicit xapian ____________ TrackerConfig.testInvalidIndexerLanguage_xapian_missing _____________ self = <test.test_config.TrackerConfig testMethod=testInvalidIndexerLanguage_xapian_missing> def testInvalidIndexerLanguage_xapian_missing(self): """Using default path for indexers, make import of xapian fail and prevent exception from happening even though the indexer_language would be invalid for xapian. """ print("Testing xapian not loadable") # SETUP: same as testInvalidIndexerLanguage_w_empty self.munge_configini(mods=[ ("indexer = ", ""), ("indexer_language = ", "NO_LANG") ]) import sys # Set module to Non to prevent xapian from loading sys.modules['xapian'] = None config.load(self.dirname) # need to delete both to make python2 not error finding _xapian del(sys.modules['xapian']) > del(sys.modules['xapian._xapian']) E KeyError: 'xapian._xapian' test/test_config.py:417: KeyError ------------------------------ Captured stdout call ------------------------------ Testing xapian not loadable ====================== 3 failed, 19 passed in 13.48 seconds ====================== Ralf -- Dr. Ralf Schlatterbeck Tel: +43/2243/26465-16 Open Source Consulting www: www.runtux.com Reichergasse 131, A-3411 Weidling email: [email protected]