def test_extended_config_from_dict():
    """Test that ExtendedConfig.from_dict successfully creates an instance.

    This test verifies that the from_dict method correctly creates an instance
    from a dictionary containing arbitrary extra keys.
    """
    data = {'foo': 'bar', 'baz': 123, 'flag': True}
    ext_cfg = ExtendedConfig.from_dict(data)

    # Check that the keys are accessible both as attributes and via __getitem__
    assert ext_cfg.foo == 'bar'
    assert ext_cfg['baz'] == 123
    assert ext_cfg.flag is True
    # Verify the root dictionary contains all keys
    assert ext_cfg.root == data
Test that ExtendedConfig.from_dict successfully creates an instance.

    This test verifies that the from_dict method correctly creates an instance
    from a dictionary containing arbitrary extra keys.
    
tests/unit/test_config_extended.py