(self)
| 209 | |
| 210 | class TestArgParseCL(TestCase): |
| 211 | def test_basic(self): |
| 212 | cl = MyLoader1() |
| 213 | config = cl.load_config("-f hi -b 10 -n wow".split()) |
| 214 | self.assertEqual(config.Global.foo, "hi") |
| 215 | self.assertEqual(config.MyClass.bar, 10) |
| 216 | self.assertEqual(config.n, True) |
| 217 | self.assertEqual(config.Global.bam, "wow") |
| 218 | config = cl.load_config(["wow"]) |
| 219 | self.assertEqual(list(config.keys()), ["Global"]) |
| 220 | self.assertEqual(list(config.Global.keys()), ["bam"]) |
| 221 | self.assertEqual(config.Global.bam, "wow") |
| 222 | |
| 223 | def test_add_arguments(self): |
| 224 | cl = MyLoader2() |
nothing calls this directly
no test coverage detected