@@ 78-94 (lines=17) @@ | ||
75 | self.assertEqual(str(sections["test"]), |
|
76 | "test {value : '1', testval : '5'}") |
|
77 | ||
78 | Constants.system_coafile = tmp |
|
79 | ||
80 | def test_user_coafile_parsing(self): |
|
81 | tmp = Constants.user_coafile |
|
82 | ||
83 | Constants.user_coafile = os.path.abspath(os.path.join( |
|
84 | os.path.dirname(os.path.realpath(__file__)), |
|
85 | "section_manager_test_files", |
|
86 | "default_coafile")) |
|
87 | ||
88 | sections, local_bears, global_bears, targets = gather_configuration( |
|
89 | lambda *args: True, |
|
90 | self.log_printer, |
|
91 | arg_list=[]) |
|
92 | ||
93 | self.assertEqual(str(sections["test"]), |
|
94 | "test {value : '1', testval : '5'}") |
|
95 | ||
96 | Constants.user_coafile = tmp |
|
97 | ||
@@ 60-76 (lines=17) @@ | ||
57 | "-c " + escape(temporary, "\\"), |
|
58 | "-b LineCountBear -s"])) |
|
59 | ||
60 | self.assertEqual(len(local_bears["default"]), 0) |
|
61 | ||
62 | def test_default_coafile_parsing(self): |
|
63 | tmp = Constants.system_coafile |
|
64 | ||
65 | Constants.system_coafile = os.path.abspath(os.path.join( |
|
66 | os.path.dirname(os.path.realpath(__file__)), |
|
67 | "section_manager_test_files", |
|
68 | "default_coafile")) |
|
69 | ||
70 | sections, local_bears, global_bears, targets = gather_configuration( |
|
71 | lambda *args: True, |
|
72 | self.log_printer, |
|
73 | arg_list=[]) |
|
74 | ||
75 | self.assertEqual(str(sections["test"]), |
|
76 | "test {value : '1', testval : '5'}") |
|
77 | ||
78 | Constants.system_coafile = tmp |
|
79 |