comparison tests/test.py @ 109:057d87d030f1

Test replacing lists by strings and replacing strings by lists
author Franz Glasner <hg@dom66.de>
date Sat, 24 Mar 2018 16:04:52 +0100
parents 1c2f8a96dec2
children c50ad93eb5dc
comparison
equal deleted inserted replaced
108:2196362c0467 109:057d87d030f1
119 url = cfg.getvar_s("db.engines.ro.url") 119 url = cfg.getvar_s("db.engines.ro.url")
120 self.assertEqual( 120 self.assertEqual(
121 u("postgresql+psycopg2://the_database_user:the-database-password@anotherhost:5432/my_database_catalog"), 121 u("postgresql+psycopg2://the_database_user:the-database-password@anotherhost:5432/my_database_catalog"),
122 url) 122 url)
123 123
124 self.assertEqual(u("not a list any more"),
125 cfg.getvar_s("test.List"))
126
127 self.assertEqual(list(range(0, 3)),
128 cfg.getvar_s("test.Str"))
129
124 def test02_load_with_ini(self): 130 def test02_load_with_ini(self):
125 cfg = configmix.load( 131 cfg = configmix.load(
126 os.path.join(TESTDATADIR, "conf20.yml"), 132 os.path.join(TESTDATADIR, "conf20.yml"),
127 os.path.join(TESTDATADIR, "conf21.yml"), 133 os.path.join(TESTDATADIR, "conf21.yml"),
128 os.path.join(TESTDATADIR, "conf22.ini")) 134 os.path.join(TESTDATADIR, "conf22.ini"))