summaryrefslogtreecommitdiff
path: root/cbuildbot/cbuildbot_config_unittest.py
diff options
context:
space:
mode:
authorDon Garrett <dgarrett@google.com>2015-05-01 18:19:43 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-05-05 03:36:10 +0000
commit6050dd8282829b469116bef244b2937ea087be3f (patch)
tree37593f20e30e6e9f4cfb2cf4d5ae828b370b0962 /cbuildbot/cbuildbot_config_unittest.py
parent60c9449f5d5cf1750c8351c61f495624d095d382 (diff)
downloadchromite-6050dd8282829b469116bef244b2937ea087be3f.tar.gz
cbuidlbot_config: Rename _config -> BuildConfig.
The _config class is used in a number of unittests so officially export it. Also makes it generally easier to search for. TEST=cbuildbot/run_tests && cros lint *.py BUG=chromium:483566 Change-Id: Ia5a921ff53ab3397927e19cd33de69970f88f1c9 Reviewed-on: https://chromium-review.googlesource.com/268915 Reviewed-by: Mike Frysinger <vapier@chromium.org> Tested-by: Don Garrett <dgarrett@chromium.org> Commit-Queue: Don Garrett <dgarrett@chromium.org>
Diffstat (limited to 'cbuildbot/cbuildbot_config_unittest.py')
-rw-r--r--cbuildbot/cbuildbot_config_unittest.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/cbuildbot/cbuildbot_config_unittest.py b/cbuildbot/cbuildbot_config_unittest.py
index 40a825bb6..794dfc021 100644
--- a/cbuildbot/cbuildbot_config_unittest.py
+++ b/cbuildbot/cbuildbot_config_unittest.py
@@ -91,14 +91,13 @@ class ConfigClassTest(cros_test_lib.TestCase):
# pylint: disable=protected-access
def testDeleteKey(self):
- base_config = cbuildbot_config._config(foo='bar')
+ base_config = cbuildbot_config.BuildConfig(foo='bar')
inherited_config = base_config.derive(foo=cbuildbot_config.delete_key())
self.assertTrue('foo' in base_config)
self.assertFalse('foo' in inherited_config)
def testDeleteKeys(self):
- base_config = cbuildbot_config._config(foo='bar',
- baz='bak')
+ base_config = cbuildbot_config.BuildConfig(foo='bar', baz='bak')
inherited_config_1 = base_config.derive(qzr='flp')
inherited_config_2 = inherited_config_1.derive(
cbuildbot_config.delete_keys(base_config))
@@ -106,14 +105,14 @@ class ConfigClassTest(cros_test_lib.TestCase):
def testCallableOverrides(self):
append_foo = lambda x: x + 'foo' if x else 'foo'
- base_config = cbuildbot_config._config()
+ base_config = cbuildbot_config.BuildConfig()
inherited_config_1 = base_config.derive(foo=append_foo)
inherited_config_2 = inherited_config_1.derive(foo=append_foo)
self.assertEqual(inherited_config_1, {'foo': 'foo'})
self.assertEqual(inherited_config_2, {'foo': 'foofoo'})
def testAppendUseflags(self):
- base_config = cbuildbot_config._config()
+ base_config = cbuildbot_config.BuildConfig()
inherited_config_1 = base_config.derive(
useflags=cbuildbot_config.append_useflags(['foo', 'bar', '-baz']))
inherited_config_2 = inherited_config_1.derive(