diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-23 12:33:48 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-23 12:34:53 +0000 |
commit | 16d5f40ad20fd08bf7a4d0e36200c739b5a9f59e (patch) | |
tree | 3a04e3237a61bd41de8c73151026605d1164bb1d /lib/bb/tests/data.py | |
parent | 6c046660cfc4fb3792a42aeafff91a13f68a2e89 (diff) | |
download | bitbake-contrib-16d5f40ad20fd08bf7a4d0e36200c739b5a9f59e.tar.gz |
tests/data: Add a key deletion test
If you copy the datastore, then delete a key, it should not exist in
d.keys(). This adds a test to cover the recently found data store bug.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/tests/data.py')
-rw-r--r-- | lib/bb/tests/data.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/bb/tests/data.py b/lib/bb/tests/data.py index 9b09ff4c6..81e4091ff 100644 --- a/lib/bb/tests/data.py +++ b/lib/bb/tests/data.py @@ -121,6 +121,12 @@ class DataExpansions(unittest.TestCase): keys = self.d.keys() self.assertEqual(keys, ['value_of_foo', 'foo', 'bar']) + def test_keys_deletion(self): + newd = bb.data.createCopy(self.d) + newd.delVar("bar") + keys = newd.keys() + self.assertEqual(keys, ['value_of_foo', 'foo']) + class TestNestedExpansions(unittest.TestCase): def setUp(self): self.d = bb.data.init() |