comparison tests/test.py @ 372:ac3e3cd6faae

FIX: 4ff02a4f401a made a somewhat wrong fix for Python 2.7: now the real fix takes into account that all text types are supposed to be Unicode in Python 2
author Franz Glasner <fzglas.hg@dom66.de>
date Sun, 11 Jul 2021 16:43:14 +0200
parents 873b9d2ecb0b
children 0c65aac81807
comparison
equal deleted inserted replaced
371:873b9d2ecb0b 372:ac3e3cd6faae
458 self.assertEqual(9999, cfg.getintvar_s("non.existing.key", 458 self.assertEqual(9999, cfg.getintvar_s("non.existing.key",
459 default=9999)) 459 default=9999))
460 def test17_getintvar_s_with_default(self): 460 def test17_getintvar_s_with_default(self):
461 cfg = self._load(os.path.join(TESTDATADIR, "conf20.yml")) 461 cfg = self._load(os.path.join(TESTDATADIR, "conf20.yml"))
462 self.assertFalse(cfg.getboolvar_s("non.existing.key", 462 self.assertFalse(cfg.getboolvar_s("non.existing.key",
463 default=False)) 463 default=u('false')))
464 464
465 def test18_getfirstvar_nonexisting(self): 465 def test18_getfirstvar_nonexisting(self):
466 cfg = self._load(os.path.join(TESTDATADIR, "conf20.yml")) 466 cfg = self._load(os.path.join(TESTDATADIR, "conf20.yml"))
467 self.assertRaises( 467 self.assertRaises(
468 KeyError, 468 KeyError,