code: def test_context_config():
      """Test GLContext handling of config dict"""
      default_config = get_default_config()
  
      # Pass default config unchanged
      c = GLContext(default_config)
      assert_equal(c.config, default_config)
      # Must be deep copy
      c.config["double_buffer"] = False
      assert_not_equal(c.config, default_config)
  
      # Passing nothing should yield default config
      c = GLContext()
      assert_equal(c.config, default_config)
      # Must be deep copy
      c.config["double_buffer"] = False
      assert_not_equal(c.config, default_config)
  
      # This should work
      c = GLContext({"red_size": 4, "double_buffer": False})
      assert_equal(c.config.keys(), default_config.keys())
  
      # Passing crap should raise
      assert_raises(KeyError, GLContext, {"foo": 3})
      assert_raises(TypeError, GLContext, {"double_buffer": "not_bool"})
  
      # Capabilites are passed on
      assert "gl_version" in c.capabilities
  
file_path: vispy/vispy/gloo/tests/test_context.py
imports: import gc
  from vispy.testing import assert_in, run_tests_if_main, assert_raises, assert_equal, assert_not_equal
  from vispy import gloo
  from vispy.gloo import GLContext, get_default_config
label_desc: Use image node_id 1 for calling a global function with example usage: test_context_config() without return types