def testRUpdateEmpty(self):
        d = {}

        # Both empty.
        dictutils.rUpdate(d, {})
        self.assertDictEqual(d, {})

        # Original empty.
        dictutils.rUpdate(d, {"a": 1})
        self.assertDictEqual(d, {"a": 1})

        # Update empty.
        dictutils.rUpdate(d, {})
        self.assertDictEqual(d, {"a": 1})
  def testRUpdateEmpty(self):
    d = {}

    # Both empty.
    dictutils.rUpdate(d, {})
    self.assertDictEqual(d, {})

    # Original empty.
    dictutils.rUpdate(d, {"a": 1})
    self.assertDictEqual(d, {"a": 1})

    # Update empty.
    dictutils.rUpdate(d, {})
    self.assertDictEqual(d, {"a": 1})
 def testRUpdateBasic(self):
     d = {"a": {"b": 2, "e": 4}, "c": {"d": 3}}
     dictutils.rUpdate(d, {"a": {"b": 5}})
     self.assertDictEqual(d, {"a": {"b": 5, "e": 4}, "c": {"d": 3}})
 def testRUpdateBasic(self):
   d = {"a": {"b": 2, "e": 4},
        "c": {"d": 3}}
   dictutils.rUpdate(d, {"a": {"b": 5}})
   self.assertDictEqual(d, {"a": {"b": 5, "e": 4},
                            "c": {"d": 3}})
def updateConfigFromSubConfig(config):
  # Newer method just updates from sub-experiment
  # _config is the configuration provided by the sub-experiment
  global _config
  rUpdate(config, _config)
  _config = dict()
def updateConfigFromSubConfig(config):
  # _config is the configuration provided by the sub-experiment
  global _config
  rUpdate(config, _config)
  _config = dict()
Exemple #7
0
def updateConfigFromSubConfig(config):
    # _config is the configuration provided by the sub-experiment
    global _config
    rUpdate(config, _config)
    _config = dict()