(self)
| 337 | assert settings.getpriority("nonexistentkey") is None |
| 338 | |
| 339 | def test_getwithbase(self): |
| 340 | s = BaseSettings( |
| 341 | { |
| 342 | "TEST_BASE": BaseSettings({1: 1, 2: 2}, "project"), |
| 343 | "TEST": BaseSettings({1: 10, 3: 30}, "default"), |
| 344 | "HASNOBASE": BaseSettings({3: 3000}, "default"), |
| 345 | } |
| 346 | ) |
| 347 | s["TEST"].set(2, 200, "cmdline") |
| 348 | assert set(s.getwithbase("TEST")) == {1, 2, 3} |
| 349 | assert set(s.getwithbase("HASNOBASE")) == set(s["HASNOBASE"]) |
| 350 | assert s.getwithbase("NONEXISTENT") == {} |
| 351 | |
| 352 | def test_maxpriority(self): |
| 353 | # Empty settings should return 'default' |
nothing calls this directly
no test coverage detected