Test dumping nested config.
(self, temp_dir)
| 145 | assert dumped["key"] == "value" |
| 146 | |
| 147 | def test_dump_nested(self, temp_dir): |
| 148 | """Test dumping nested config.""" |
| 149 | config_path = os.path.join(temp_dir, "config.py") |
| 150 | with open(config_path, "w") as f: |
| 151 | f.write("outer = dict(inner='value')\n") |
| 152 | |
| 153 | config = Config(config_path) |
| 154 | dumped = config.dump() |
| 155 | assert isinstance(dumped, dict) |
| 156 | assert dumped["outer"]["inner"] == "value" |
| 157 | |
| 158 | def test_dump_preserves_types(self, temp_dir): |
| 159 | """Test dump preserves data types.""" |