prieto 9 years ago
parent
commit
b4da6c14c9

+ 8
- 0
tests/settings/conf_raise.d/a.ini View File

@@ -0,0 +1,8 @@
1
+[A]
2
+a=a1
3
+b=b1,b2,b3
4
+c=toto
5
+[C]
6
+ca=a2
7
+cb=b4,b2,b3
8
+cc=titi

+ 8
- 0
tests/settings/conf_raise.d/b.ini View File

@@ -0,0 +1,8 @@
1
+[B]
2
+ab=art
3
+bb=bj,kl,mn
4
+cb=tatat
5
+[A]
6
+fhui=njl
7
+a=gh
8
+

+ 3
- 1
tests/settings/test_settings_loader.py View File

@@ -31,9 +31,11 @@ class SettingsLoaderTestCase(unittest.TestCase):
31 31
         f=settings.getoption('C','cb',maFonction)
32 32
         f=settings.getoption('C','ca',maFonction)
33 33
         f=settings.getoption('C','cc',maFonction)
34
-       
34
+        f=settings.getoption('C','a',maFonction)
35 35
         g=settings.getremains()
36 36
         self.assertEqual(g,[])
37
+        with self.assertRaises(SettingsError):
38
+            loader = SettingsLoader('tests/settings/conf_raise.d')
37 39
     
38 40
     def test_merge(self):
39 41
         """ Test merge of multiple configuration files """

Loading…
Cancel
Save