def test_4(self): """Test package config overrides.""" conf = os.path.join(self.config_path, "test2.py") config2 = Config([self.root_config_file, conf]) with _replace_config(config2): pkg = get_developer_package(self.config_path) c = pkg.config self._test_basic(c) # check overrides from package.py are working os.environ["REZ_BUILD_DIRECTORY"] = "foo" # should have no effect self.assertEqual(c.build_directory, "weeble") self.assertEqual(c.plugins.release_vcs.tag_name, "tag") # check list modification is working self.assertEqual(c.release_hooks, ["foo", "bah"]) # check list modification within plugin settings is working self.assertEqual(c.plugins.release_hook.emailer.recipients, ["*****@*****.**", "*****@*****.**"]) # check system expansion in package overridden setting works expected_value = "*****@*****.**" % system.user self.assertEqual(c.plugins.release_hook.emailer.sender, expected_value) # check env-var expansion in package overridden setting works os.environ["FUNK"] = "dude" expected_value = ["FOO", "BAH_dude", "EEK"] self.assertEqual(c.parent_variables, expected_value) self._test_overrides(c)